aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* refactor(marktree): unpaired marktree_get_alt() returns itselfLuuk van Baal2024-01-13
| | | | Avoids checking for invalid mark at callsite.
* refactor(decorations): more conservative redraw rangeLuuk van Baal2024-01-13
| | | | | | Problem: Decor range is being redrawn unconditionally, negating the more conservative line redrawing that follows. Solution: Get rid of unconditional redraw_buf_range_later() call.
* Merge pull request #26734 from bfredl/splitaroobfredl2024-01-13
|\ | | | | fix(buffer_updates): correct buffer updates when splitting empty line
| * fix(buffer_updates): correct buffer updates when splitting empty linebfredl2024-01-13
| | | | | | | | fixes #11591
* | vim-patch:9.1.0022: Coverity complains about improper use of negative value ↵zeertzjq2024-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#27001) Problem: Coverity complains about improper use of negative value Solution: Add a condition to validate that keytyped is larger or equal to 0 Apparently patch 9.1.0006 made it more explicit for Coverity, that the TOLOWER_LOC() macros do not handle negative values properly. However, that condition has always been there even before that, so add a condition to verify that keytyped is indeed at least 0 closes: vim/vim#13824 https://github.com/vim/vim/commit/49471963fefbdf78239d9066d84e14e1876fb177 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.0021: i_CTRL-R- doesn't work for multibyte chars in Replace modezeertzjq2024-01-13
| | | | | | | | | | | | | | | | | | | | | | Problem: i_CTRL-R- doesn't work for multibyte chars in Replace mode, Coverity complains missing return value for u_save_cursor() Solution: Use mb_charlen() and del_chars() instead, handle failure mode for u_save_cursor() correctly (@zeertzjq) closes: vim/vim#13846 https://github.com/vim/vim/commit/424ec1f235a53131042aed94d30f6e2528e551d9
* | vim-patch:9.1.0015: i_CTRL-R- no longer works in replace modezeertzjq2024-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: i_CTRL-R- no longer works in replace mode Solution: delete characters in replace mode before putting, add a test, add a bit warning into the documentation, that i_CTRL-R-P/O is not supported in Replace mode for now fixes: vim/vim#13792 closes: vim/vim#13816 https://github.com/vim/vim/commit/5d5cbb2b9ac526fb6fad2116e24a282affc45efe Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.0016: default diff highlighting is too noisyChristian Clason2024-01-12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: default diff highlighting is too noisy Solution: Link diff highlighting groups to new Added/Removed/Changed, revert previous change (Romain Lafourcade) Remove diff* links added in vim/vim#13776 and doc added in commit b1392be The links added in vim/vim#13776 are way too noisy for the contexts in which the `diff` syntax is applied (git commits, patches, etc.). This commit: - removes those links - adds new default highlighting groups Added, Changed and Removed - links the diff highlighting groups to those new defaults - removes the doc changes - adjusts the syntax_completion test for those newly added group names Note: Changes to the default color schemes will be handled separately, by adding links to those newly created Added/Removed/Changed highlighting groups. related: vim/vim#13776 closes vim/vim#13825 https://github.com/vim/vim/commit/124371c5a149a8c0c75c04b6c90ac11e71a0aa97 Co-authored-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
* vim-patch:9.1.0011: regexp cannot match combining chars in collection (#26992)zeertzjq2024-01-12
| | | | | | | | | | | | | | Problem: regexp cannot match combining chars in collection Solution: Check for combining characters in regex collections for the NFA and BT Regex Engine Also, while at it, make debug mode work again. fixes vim/vim#10286 closes: vim/vim#12871 https://github.com/vim/vim/commit/d2cc51f9a1a5a30ef5d2e732f49d7f495cae24cf Co-authored-by: Christian Brabandt <cb@256bit.org>
* refactor(IWYU): fix headersdundargoc2024-01-11
| | | | | | Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
* Merge pull request #26961 from bfredl/drawendbfredl2024-01-11
|\ | | | | refactor(screen): simplify grid_clear() and win_draw_end()
| * refactor(screen): simplify grid_clear() and win_draw_end()bfredl2024-01-11
| | | | | | | | | | | | | | | | | | | | | | grid_put_linebuf() used grid_clear() internally to handle clearing the left part of a rightleft line. By reimplementing that internally, we can instead use grid_put_linebuf() as the implementation of grid_clear(), which in the end is a net reduction of code as grid_fill() is used for nothing else. win_draw_end: Implement "draw_margin" on a per-row basis which closer reflects how terminals work. Also use the magic mirror for 'rightleft'
* | fix(doc): improve doc generation of types using lpegLewis Russell2024-01-11
| | | | | | | | Added a lpeg grammar for LuaCATS and use it in lua2dox.lua
* | fix(pum): handle right-click menu repositioning with multigrid (#26975)zeertzjq2024-01-10
| |
* | fix(terminal): use terminal buffer for TermRequest autocommand (#26974)Gregory Anders2024-01-09
| |
* | refactor(options): remove `OPT_FREE` (#26963)Famiu Haque2024-01-10
| | | | | | | | | | | | Problem: `OPT_FREE` macro doesn't seem to do anything as `P_ALLOCED` already handles allocations. Solution: Remove `OPT_FREE`.
* | feat(terminal): trigger TermRequest autocommand events (#22159)Ghjuvan Lacambre2024-01-09
|/ | | | | | | | | | This commit implements a new TermRequest autocommand event and has Neovim emit this event when children of terminal buffers emit an OSC or DCS sequence libvterm does not handle. The TermRequest autocommand event has additional data in the v:termrequest variable. Co-authored-by: Gregory Anders <greg@gpanders.com>
* fix(extmarks): blending space shouldn't overwrite wide char (#26960)zeertzjq2024-01-09
|
* refactor(drawline): remove unused save_extra argument (#26959)zeertzjq2024-01-09
|
* fix(extmarks): handle overwriting right half of wide char (#26951)zeertzjq2024-01-09
|
* refactor(options): use schar_T representation for fillchars and listcharsbfredl2024-01-08
| | | | | | | | | | | A bit big, but practically it was a lot simpler to change over all fillchars and all listchars at once, to not need to maintain two parallel implementations. This is mostly an internal refactor, but it also removes an arbitrary limitation: that 'fillchars' and 'listchars' values can only be single-codepoint characters. Now any character which fits into a single screen cell can be used.
* fix(tui): use buflen to calculate remaining buffer size (#26942)James McCoy2024-01-07
| | | buf is a pointer argument, not a local char array, so sizeof(buf) is just the size of a pointer type on the platform. This is always an incorrect value, but on 32-bit platforms it actually has an impact, since sizeof(buf) is just 4 and causes the buffer to get truncated.
* fix(highlight): update `IncSearch` to link to `CurSearch`Evgeni Chasnovski2024-01-06
| | | | | | | | Problem: `IncSearch` is currently linked to `Search` which makes it not usable for its purpose of showing current match with 'incsearch' and confirming matches after `:s///c`. Solution: Link it to `CurSearch`.
* vim-patch:9.1.0014: incorrect use of W_WINROW in edit.c (#26910)zeertzjq2024-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: incorrect use of W_WINROW in edit.c Solution: compare against curwin->w_height instead Remove incorrect use of W_WINROW In structs.h it is mentioned that w_wrow is relative to w_winrow, so using W_WINROW doesn't make sense when comparing with window height. This change won't lead to any observable behavior change: The condition intends to check if there are 'scrolloff' lines between the current cursor when the bottom of the window. When W_WINROW(curwin) is added to curwin->w_height - 1 - get_scrolloff_value(), the condition is instead satisfied when the cursor is on some screen line below that position. However, - If 'scrolloff' is smaller than half the window height, this condition can only be satisfied when W_WINROW(curwin) == 0. And if it is not satisfied, update_topline() does the actual scrolling. - If 'scrolloff' is larger than half the window height, update_topline() will put the cursor at the center of the window soon afterwards anyway, because set_topline() now unsets VALID_TOPLINE flag starting from https://github.com/vim/vim-history/commit/7db7bb45b0f919ff0615d463ebd4fde881c69d1f. To put it in another way, https://github.com/vim/vim-history/commit/7db7bb45b0f919ff0615d463ebd4fde881c69d1f makes the update_topline() just below correct the mistakes made in this block, so this incorrect use of W_WINROW() no longer affects observable behavior. closes: vim/vim#12331 https://github.com/vim/vim/commit/b1ed7ec9f7d1a0142d4f1c8c83bab9172bc92c7c
* vim-patch:9.1.0012: regression with empty inner blocks introducedzeertzjq2024-01-06
| | | | | | | | | | | | | | Problem: regression with empty inner blocks introduced (after v9.1.0007) Solution: Set correct cursor position, Check for visual mode being active (Maxim Kim) relates: vim/vim#13514 closes: vim/vim#13819 https://github.com/vim/vim/commit/3779516988f14f2070d827514c79383334a0946b Co-authored-by: Maxim Kim <habamax@gmail.com>
* vim-patch:9.1.0007: can select empty inner text blockszeertzjq2024-01-06
| | | | | | | | | | | | | | | Problem: can select empty inner text blocks (laurentalacoque) Solution: make selecting empty inner text blocks an error textobjects: Make selecting inner empty blocks an error fixes: vim/vim#13514 closes: vim/vim#13523 https://github.com/vim/vim/commit/ad4d7f446dc6754bde212234d46f4849b520b6e0 Co-authored-by: Christian Brabandt <cb@256bit.org>
* refactor: move structs from regexp_defs.h to regexp.c (#26899)zeertzjq2024-01-05
| | | | These structs are only used in other source files as pointers and their fields aren't accessed in other source files.
* fix(column): fill 'statuscolumn' clickdefs with evaluated width (#26891)luukvbaal2024-01-05
|
* fix(terminal): check if mouse on statusline/tabline/winbar/vsep (#26892)zeertzjq2024-01-05
|
* vim-patch:9.1.0010: Keymap completion is not available (#26888)zeertzjq2024-01-05
| | | | | | | | | | | | | Problem: Keymap completion is not available Solution: Add keymap completion (Doug Kearns) Add keymap completion to the 'keymap' option, user commands and builtin completion functions. closes: vim/vim#13692 https://github.com/vim/vim/commit/81642d9d6ff5cd6a90a012b1b98632ce51eeb1a8 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* refactor(column): define and use maximum 'statuscolumn' widthLuuk van Baal2024-01-04
| | | | | Problem: The maximum 'statuscolumn' width and grow behavior is undocumented. Solution: Define, use and document the maximum 'statuscolumn' width and grow behavior.
* fix(decorations): incompletely displayed line should also get decorationsJaehwang Jung2024-01-04
|
* fix(decorations): validate botline for on_winJaehwang Jung2024-01-04
| | | | | | | | | | | | | | | | | | | Problem: Many decoration providers (treesitter injection highlighting, semantic token highlighting, inlay hint) rely on the correctness of the `botline` argument of `on_win` callback. However, `botline` can be smaller than the actual line number of the last displayed line if some lines are folded. In such cases, some decorations will be missing in the lines not covered by `botline`. Solution: Validate `botline` when invoking `on_win`. NOTE: It seems that the old code was deliberately avoiding this presumably due to performance reasons. However, I haven't experienced noticeable lag after this change, and I believe the cost of botline computation would be much smaller than the cost of decoration providers.
* vim-patch:9.1.0001: when closing window, wincmd p may failChristian Clason2024-01-03
| | | | | | | | | | | | | | | | | | | | Avoid `prevwin == curwin` when closing `curwin` Problem: When closing the current window (or when moving it to a tabpage), the previous window may refer to the new current window (`winnr() == winnr('#')`) if that window is selected as the new current window. Solution: Set `prevwin = NULL` when switching away from an invalid `curwin` and the target window was the `prevwin`. (Sean Dewar) related: vim/vim#4537 closes: vim/vim#13762 https://github.com/vim/vim/commit/bf44b69d1f91d9778ae1887128c63d35d9a3d19b Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* vim-patch:9.1.0002: a closing fold expr, may start a new fold (#26876)zeertzjq2024-01-04
| | | | | | | | | | | | | | | Problem: a closing fold expression may unexpectedly start a new fold when it should end a fold (reported by Shota Nozaki) Solution: if a fold hasn't started yet, do not immediately start a new fold with level 1 (Shota Nozaki) fixes: vim/vim#12768 closes: vim/vim#13748 https://github.com/vim/vim/commit/0689b870595c687a23e102913ce5037f65d03748 Co-authored-by: Shota Nozaki <emonkak@gmail.com>
* Merge pull request #26860 from sus-domesticus/fix/clangdzeertzjq2024-01-03
|\ | | | | fix/clangd (check size of array before applying qsort on it; set block pointer to null in case map is empty)
| * fix(clangd): set block pointer to null in case map is emptysus-domesticus2024-01-03
| |
| * fix(clangd): check size of array before applying qsort on itsus-domesticus2024-01-02
| |
* | refactor: remove redundant struct namesdundargoc2024-01-02
| | | | | | | | A struct can be anonymous if only its typedef is used.
* | refactor(api): redundant `ml_mfp` check #26059Justin M. Keyes2024-01-02
|/ | | | | | | | | | | | buf_ensure_loaded already checks `(buf->b_ml.ml_mfp != NULL)`. #25823 TODO: - #10070 #13201 All buffer-related API functions except `nvim_buf_is_loaded` (and `nvim_buf_is_valid`?) should always call `buf_ensure_loaded`. Because the _common case_ is that plugins expect the buffer to "just work"—and for the uncomon, performance-sensitive case, the script can check `nvim_buf_is_loaded` to avoid implicitly loading a buffer. - Update documentation to clarify the above semantics.
* fix(drawline): consider position in linebuf for foldcolumn (#26803)luukvbaal2024-01-02
|
* refactor: remove redundant NOLINT commentsdundargoc2024-01-01
|
* fix(l10n): update Ukrainian translations (#26819)Anatolii Sakhnik2024-01-01
|
* docs: clarify on_bytes argumentsJaehwang Jung2024-01-01
| | | | based on extmark_splice doc
* build: ensure `make clean` doesn't remove source filesdundargoc2024-01-01
| | | | | | | | | | | | Adding a file to `OUTPUT` in `add_custom_command` marks that file as `GENERATED` in cmake, and will thus be removed when running the `clean` target. As cmake doesn't have a good way to mark that certain files should not be removed, we instead "lie" to it by omitting the files we want to keep from `OUTPUT`. This hack only works as long as there aren't any other files that depend on the generated files we want to keep, which currently seems to be the case. If this assumption changes in the future, then we need to separate the parts that are generated and the parts that are not as to prevent an infinite dependency chain.
* refactor(tui): remove code that is no longer necessaryzeertzjq2023-12-31
|
* Handle mouse buttons 6/7 (often used for horizontal scrolling)Paul "LeoNerd" Evans2023-12-31
|
* Ignore key_mouse unless it is exactly \e[M because some terminfos relate to ↵Paul "LeoNerd" Evans2023-12-31
| | | | different encoding modes (thanks Ninji)
* build: various improvementsdundargoc2023-12-30
| | | | | | | | | | - Use `#pragma once` for `cmake.config/config.h.in` - Remove unused variable `CACHED_GENERATED_DIR` - Reorganize and sort variables - Introduce `STYLUA_DIRS` variable to ensure the `formatlua` and `lintlua-stylua` operates on the same files. - Adjust variable scope to avoid using hacky directory properties. - Add more necessary runtime files as test dependencies
* refactor: follow style guidedundargoc2023-12-30
|