aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * vim-patch:8.2.4724: current instance of last search pattern not easily spottedzeertzjq2024-06-19
| | | | | | | | | | | | | | | | | | | | | | Problem: Current instance of last search pattern not easily spotted. Solution: Add CurSearch highlighting. (closes vim/vim#10133) https://github.com/vim/vim/commit/a43993897aa372159f682df37562f159994dc85c Some code is superseded by later patches that are already ported. Co-authored-by: LemonBoy <thatlemon@gmail.com>
| * fix(mouse): early return when clicking in padded 'statuscolumn' (#29394)luukvbaal2024-06-19
| | | | | | | | | | | | Problem: Hit assert when clicking inside a padded 'statuscolumn' that is padded beyond the length of the allocated click_defs. Solution: Still consider this a "in_statuscol" click, but return early when about to execute the click func.
| * vim-patch:9.1.0498: getcmdcompltype() interferes with cmdline completion ↵zeertzjq2024-06-19
| | | | | | | | | | | | | | | | | | | | | | (#29397) Problem: getcmdcompltype() interferes with cmdline completion. Solution: Don't set expand context when it's already set. (zeertzjq) closes: vim/vim#15036 https://github.com/vim/vim/commit/a821b609f9bb9daef032fe1cb8fb95995822e367
| * refactor(lua): remove unnecessary strlen() in nlua_expand_pat() (#29388)zeertzjq2024-06-18
| | | | | | | | Also change the initial value of `status` to `FAIL`, as that'll avoid unnecessary assignments.
| * refactor: Windows tilde expansion followup (#29380)Rafael Kitover2024-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to #28515: Rename the static os_homedir() to os_uv_homedir() to emphasize that it is a wrapper around a libuv function. Add the function os_get_homedir() to os/env.c to return the cached homedir value as a const. Must be called after homedir is initialized or it fails. The difference between this function and the static os_uv_homedir() is that the latter gets the homedir from libuv and is used to initialize homedir in init_homedir(), while os_get_homedir() just returns homedir as a const if it's initialized and is public. Use the os_get_homedir() accessor for ~/ expansion on Windows to make the code more concise. Add a Windows section to main_spec.lua with tests for expanding ~/ and ~\ prefixes for files passed in on the command-line. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
| * fix(lua): find length of completion prefix earlier (#29384)zeertzjq2024-06-18
| | | | | | | | | | Do the expansion right after setting the expand context, so that the length of the completion prefix can be set, but don't do that directly in set_one_cmd_context(), as that's also called by getcmdcompltype().
| * vim-patch:9.1.0496: matched text is highlighted case-sensitivelyzeertzjq2024-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: matched text is highlighted case-sensitively Solution: use MB_STRNICMP, update highlighting when the base changes (glepnir) fixes: vim/vim#15021 closes: vim/vim#15023 https://github.com/vim/vim/commit/f189138b39a11ed5cf3adea6610469b478841aba Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.0495: Matched text isn't highlighted in cmdline pumzeertzjq2024-06-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Matched text isn't highlighted in cmdline pum. Solution: Use cmdline completion pattern in cmdline mode. (zeertzjq) closes: vim/vim#15029 https://github.com/vim/vim/commit/d8c9340fc67ca19f82ec3e77ec38296424e758cf Cherry-pick syntax.txt change from runtime update.
| * vim-patch:9.1.0494: Wrong matched text highlighted in pum with 'rightleft' ↵zeertzjq2024-06-17
| | | | | | | | | | | | | | | | | | | | | | (#29371) Problem: Wrong matched text highlighted in pum with 'rightleft'. Solution: Match using the original text instead of the reversed text. (zeertzjq) closes: vim/vim#15020 https://github.com/vim/vim/commit/63901e89638d683ecbc8e3323170dd485657fd1d
| * Merge pull request #29357 from luukvbaal/statuscolzeertzjq2024-06-17
| |\ | | | | | | feat(column)!: rework 'statuscolumn' %r/l items
| | * feat(column)!: rework 'statuscolumn' %r/l itemsLuuk van Baal2024-06-16
| | | | | | | | | | | | | | | | | | | | | Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item.
| | * refactor: remove redundant copy in statuscolumn itemsLuuk van Baal2024-06-16
| | | | | | | | | | | | | | | Immediately write to buf_tmp instead of to another temporary buffer that is later copied to buf_tmp. Misc cleanup.
| * | vim-patch:9.1.0489: default completion may break with fuzzy (#29364)zeertzjq2024-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: default completion may break with fuzzy Solution: check that completion_match_array is not null (glepnir) closes: vim/vim#15010 https://github.com/vim/vim/commit/aced8c2f4fd1cf3f8ac7cdb0dd54d19ef4390ef8 Co-authored-by: glepnir <glephunter@gmail.com>
| * | docs: document 'list' behavior when 'listchars' excludes "tab" (#29360)zeertzjq2024-06-16
| | |
| * | vim-patch:9.1.0491: Cmdline pum doesn't work properly with 'rightleft' (#29355)zeertzjq2024-06-15
| |/ | | | | | | | | | | | | | | | | | | | | Problem: Cmdline pum doesn't work properly with 'rightleft'. Solution: Don't use curwin->w_p_rl in cmdline mode in pum_redraw(). Use a static variable since pum_may_redraw() may be called in any mode. Also correct position of other popups with 'rightleft'. (zeertzjq) closes: vim/vim#15005 https://github.com/vim/vim/commit/883018feff43413813770dd1e13d4f950aa38524
| * vim-patch:9.1.0490: minor style problems with patch 9.1.0487 (#29354)zeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: minor style problems with patch 9.1.0487 Solution: use shown_compl instead of after_first_compl variable (glepnir) closes: vim/vim#15008 fix(completion): use exist shown_compl instead after_first_compl https://github.com/vim/vim/commit/105f741fac1b3242909c3c69384f00e4dcd9356e Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.0488: Wrong padding for pum "kind" with 'rightleft' (#29352)zeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong padding for pum "kind" with 'rightleft'. Solution: Fix off-by-one error (zeertzjq). The screen_fill() above is end-exclusive, and - With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`, so the next `col` should be `pum_col - pum_base_width - n`. - With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`, so the next `col` should be `pum_col - pum_base_width + n`. closes: vim/vim#15004 https://github.com/vim/vim/commit/a2324373eb1c3f1777bc40cb6dcd5e895a15fe10
| * vim-patch:9.1.0487: completed item not update on fuzzy completion (#29341)zeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | | | Problem: completed item not update on fuzzy completion Solution: reset compl_shown_match when at original match position (glepnir) closes: vim/vim#14955 https://github.com/vim/vim/commit/f94c9c482a6dd488f0136ac99499eb6e2ab3ccca Co-authored-by: glepnir <glephunter@gmail.com>
| * docs: misc (#29229)dundargoc2024-06-15
| | | | | | | | | | | | Co-authored-by: Ilia Choly <ilia.choly@gmail.com> Co-authored-by: Jose Pedro Oliveira <jose.p.oliveira.oss@gmail.com> Co-authored-by: Maria José Solano <majosolano99@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * vim-patch:c509c00: runtime(doc): fix wrong helptag for :deferzeertzjq2024-06-15
| | | | | | | | | | | | https://github.com/vim/vim/commit/c509c009bbc07eff678a9239a5813398e180f019 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:d6d4e13: runtime(doc): rewrite mkdir() doc and simplify {flags} ↵zeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | meaning related: vim/vim#14991 https://github.com/vim/vim/commit/d6d4e1333659c0d2acee3133819498d014df47de Co-authored-by: Christian Brabandt <cb@256bit.org>
| * vim-patch:9.1.0485: Matched text shouldn't be highlighted in "kind" and "menu"zeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | Problem: Matched text shouldn't be highlighted in "kind" and "menu". Solution: Pass hlf_T instead of the attribute. Fix indent. (zeertzjq) closes: vim/vim#14996 https://github.com/vim/vim/commit/afbe5359e981e5d19ad23c394aefe60395c3648e
| * vim-patch:9.1.0480: fuzzy string matching executed when not neededzeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | | | | | Problem: fuzzy string matching executed when not needed Solution: when no leader is available, can skip fuzzy logic, so return early (glepnir) closes: vim/vim#14986 https://github.com/vim/vim/commit/1c296026627d7ac8195e803b4c2393c21ae659b4 Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.0479: fuzzy_match_str_with_pos() does unnecessary list operationszeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: fuzzy_match_str_with_pos() does unnecessary list operations. Solution: Use fuzzy_match() directly (zeertzjq). closes: vim/vim#14987 https://github.com/vim/vim/commit/2f95ca9fcef8495d60e298ac2cd6d702b90bfb18 N/A patch: vim-patch:9.1.0478: potential deref of NULL pointer in fuzzy_match_str_with_pos
| * vim-patch:9.1.0476: Cannot see matched text in popup menuzeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot see matched text in popup menu Solution: Introduce 2 new highlighting groups: PmenuMatch and PmenuMatchSel (glepnir) closes: vim/vim#14694 https://github.com/vim/vim/commit/40c1c3317d92f8c2adadf744fab72e4458e2a9fa Co-authored-by: glepnir <glephunter@gmail.com>
| * vim-patch:9.1.0484: Sorting of completeopt+=fuzzy is not stable (#29338)zeertzjq2024-06-15
| | | | | | | | | | | | | | | | | | Problem: Sorting of completeopt+=fuzzy is not stable. Solution: Compare original indexes when scores are the same. (zeertzjq) closes: vim/vim#14988 https://github.com/vim/vim/commit/8e56747fd26b3b040b6fcbfb6be41b7d5922c6b5
| * Merge pull request #29241 from bfredl/shadapackbfredl2024-06-14
| |\ | | | | | | refactor(shada): use msgpack_sbuffer less
| | * refactor(shada): use msgpack_sbuffer lessbfredl2024-06-11
| | | | | | | | | | | | | | | | | | | | | Work towards getting rid of libmsgpack depedency eventually. msgpack_sbuffer is just a string buffer, we can use our own String type.
| * | revert: "refactor: use S_LEN macro" (#29319)Lewis Russell2024-06-14
| | | | | | | | | | | | | | | revert: "refactor: use S_LEN(s) instead of s, n (#29219)" This reverts commit c37695a5d5f2e8914fff86f3581bed70b4c85d3c.
| * | vim-patch:d353d27: runtime(doc): restore description of "$" in col() and ↵zeertzjq2024-06-14
| | | | | | | | | | | | | | | | | | | | | | | | virtcol() (vim/vim#14981) These are different from line() and getpos(). https://github.com/vim/vim/commit/d353d2782032b91498601afefee4256592f48074
| * | vim-patch:02f3eba: runtime(doc): deduplicate getpos(), line(), col(), virtcol()zeertzjq2024-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move the main description to getpos() and link to that from the other functions. closes: vim/vim#14970 https://github.com/vim/vim/commit/02f3ebacfbfa1f892347d7532278f24620e68300
| * | fix(tui): skip TUI in ui_rgb_attached (#29096)Gregory Anders2024-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ui_rgb_attached function determines if any UI is attached which supports RGB (truecolor). We determine if the TUI supports RGB via the 'termguicolors' option which is checked at the beginning of this function. If the TUI does not support RGB ('termguicolors' is unset), we check to see if any _other_ UI is attached which supports RGB. Normally, the TUI's "rgb" flag and the 'termguicolors' option are the same. However, they may differ during startup when the "rgb" flag is set by tui/tui.c to indicate to the core that the terminal emulator supports truecolor. The 'termguicolors' option is not actually set until _defaults.lua runs.
| * | refactor(terminal): move :terminal defaults to _defaults.luaGregory Anders2024-06-12
| | |
| * | feat(highlight): add StatusLineTerm and StatusLineTermNC groupsGregory Anders2024-06-12
| | | | | | | | | | | | | | | | | | | | | These highlight groups are used for the statusline in :terminal windows. By default they link to StatusLine and StatusLineNC (respectively), so there is no visual difference unless a colorscheme defines these groups separately.
| * | vim-patch:210b39c: runtime(doc): clarify documentation for "v" position at ↵zeertzjq2024-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | line() (#29296) Problem: the previous documentation falsely states that "v" always refers to the start of a visual area. In fact, the reference of "v" and "." complement each other. If the cursor is at the start of a (characterwise) visual area, then "v" refers to the end of the area. Solution: be more verbose and explicit about the connection between "." and "v" and also refer to |v_o| which many vim users will be familiar with for visual areas. https://github.com/vim/vim/commit/210b39c2d686d875e2464ca1f42131453dc6bd41 Co-authored-by: Peter Aronoff <peter@aronoff.org>
| * | feat(terminal): add support for copying with OSC 52 in embedded terminal ↵Gregory Anders2024-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | (#29117) When libvterm receives the OSC 52 escape sequence it ignores it because Nvim does not set any selection callbacks. Install selection callbacks that forward to the clipboard provider, so that setting the clipboard with OSC 52 in the embedded terminal writes to the system clipboard using the configured clipboard provider.
| * | Merge pull request #29278 from bfredl/strcatbfredl2024-06-11
| |\ \ | | | | | | | | refactor(memory): use builtin strcat() instead of STRCAT()
| | * | refactor(memory): use builtin strcat() instead of STRCAT()bfredl2024-06-11
| | |/ | | | | | | | | | | | | | | | | | | | | | The latter was mostly relevant with the past char_u madness. NOTE: STRCAT also functioned as a counterfeit "NOLINT" for clint apparently. But NOLINT-ing every usecase is just the same as disabling the check entirely.
| * | refactor: use S_LEN(s) instead of s, n (#29219)James2024-06-11
| | |
| * | fix(types): add some vim.fn type annotationsnotomo2024-06-11
| | | | | | | | | | | | | | | | | | Problem: Some vim.fn have no type annotations. Solution: Add type annotations.
| * | refactor(lua): improve type annotationsLewis Russell2024-06-11
| |/
| * fix(column): clamp line number for legacy signsLuuk van Baal2024-06-10
| | | | | | | | | | | | | | | | Problem: Legacy :sign API still allows placing signs beyond the end of the buffer. This is unaccounted for by the signcolumn tracking logic and is disallowed in general for the extmark API which implements it now. Solution: Clamp legacy sign line number to the length of the buffer.
| * fix(api): allow `scope = 'local'` with `buf` when using `nvim_get_option_value`dundargoc2024-06-10
| | | | | | | | | | | | | | | | `nvim_get_option_value` throws a warning if both `scope` and `buf` options are used at the same time. This is because using `buf` always implies `scope` is local, and is therefore not needed. There's however no need to error if `scope` is already set "local" as it's the correct value.
| * vim-patch:9.1.0472: Inconsistencies between functions for option flags (#29262)zeertzjq2024-06-10
| | | | | | | | | | | | | | | | | | Problem: Inconsistencies between functions for option flags. Solution: Consistently use "unsigned int" as return type and rename get_bkc_value() to get_bkc_flags() (zeertzjq). closes: vim/vim#14925 https://github.com/vim/vim/commit/aa925eeb97bd294d4a5253a3194949a37cbc8365
| * refactor(os/shell): we have DynamicBuffer at homebfredl2024-06-09
| | | | | | | | DynamicBuffer at home: KVÄCK
| * Merge pull request #29141 from bfredl/rstream2bfredl2024-06-09
| |\ | | | | | | refactor(io): make rstream use a linear buffer
| | * refactor(io): make rstream use a linear bufferbfredl2024-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | If you like it you shouldn't put a ring on it. This is what _every_ consumer of RStream used anyway, either by calling rbuffer_reset, or rbuffer_consumed_compact (same as rbuffer_reset without needing a scratch buffer), or by consuming everything in each stream_read_cb call directly.
| * | feat(lua): add `vim._with`dundargoc2024-06-08
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a function to perform operations in their own sealed context, similar to pythons `with`. This helps ease operations where you need to perform an operation in a specific context, and then restore the context. Marked as private for now as it's not ready for public use. The current plan is to start using this internally so we can discover and fix any problems. Once this is ready to be exposed it will be renamed to `vim.with`. Usage: ```lua local ret = vim._with({context = val}, function() return "hello" end) ``` , where `context` is any combination of: - `buf` - `emsg_silent` - `hide` - `horizontal` - `keepalt` - `keepjumps` - `keepmarks` - `keeppatterns` - `lockmarks` - `noautocmd` - `options` - `sandbox` - `silent` - `unsilent` - `win` (except for `win` and `buf` which can't be used at the same time). This list will most likely be expanded in the future. Work on https://github.com/neovim/neovim/issues/19832. Co-authored-by: Lewis Russell <lewis6991@gmail.com>
| * refactor: quadratic behavior in vim_findfile_stopdir (#29232)James2024-06-08
| | | | | | Copies characters in-places instead. Related #27827
| * feat: get/set namespace properties #28728altermo2024-06-07
| | | | | | | | ref https://github.com/neovim/neovim/pull/28432 ref https://github.com/neovim/neovim/issues/28469