aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * fix(api): make win_set_config with "win" for splits need "split/vertical"Sean Dewar2024-03-08
| | | | | | | | | | | | | | | | | | | | Problem: currently, for splits, nvim_win_set_config accepts win without any of split or vertical set, which has little effect and seems error-prone. Solution: require at least one of split or vertical to also be set for splits. Also, update nvim_win_set_config docs, as it's no longer limited to just floating and external windows.
| * fix(api): make open_win/win_set_config check if splitting allowedSean Dewar2024-03-08
| | | | | | | | | | | | | | | | | | | | Problem: splitting is disallowed in some cases to prevent the window layout changes while a window is closing, but it's not checked for. Solution: check for this, and set the API error message directly. (Also sneak in a change to tui.c that got lost from #27352; it's a char* buf, and the memset is assuming one byte each anyway)
| * fix(api): avoid open_win UAF if target buf deleted by autocmdsSean Dewar2024-03-08
| | | | | | | | | | | | | | Problem: WinNew and win_enter autocommands can delete the target buffer to switch to, causing a heap-use-after-free. Solution: store a bufref to the buffer, check it before attempting to switch.
| * fix(api): open_win fire Buf* events when !enter && !noautocmd if entered earlySean Dewar2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: if switch_win{_noblock} fails to restore the old curwin after WinNew (e.g: it was closed), wp will become the new curwin, but win_set_buf enter events would still be blocked if !enter && !noautocmd. Solution: fire them, as we've actually entered the new window. Note: there's a problem of switch_win{_noblock} failing to restore the old curwin, leaving us in wp without triggering WinEnter/WinLeave, but this affects all callers of switch_win{_noblock} anyways. (It's also not clear how WinLeave can be called if the old curwin was closed already).
| * fix(api): open_win fire BufWinEnter for other buffer when !enter && !noautocmdSean Dewar2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: BufWinEnter is not fired when not entering a new window, even when a different buffer is specified and buffer-related autocommands are unblocked (!noautocmd). Solution: fire it in the context of the new window and buffer. Do not do it if the buffer is unchanged, like :{s}buffer. Be wary of autocommands! For example, it's possible for nvim_win_set_config to be used in an autocommand to move a window to a different tabpage (in contrast, things like wincmd T actually create a *new* window, so it may not have been possible before, meaning other parts of Nvim could assume windows can't do this... I'd be especially cautious of logic that restores curwin and curtab without checking if curwin is still valid in curtab, if any such logic exists). Also, bail early from win_set_buf if setting the temp curwin fails; this shouldn't be possible, as the callers check that wp is valid, but in case that's not true, win_set_buf will no longer continue setting a buffer for the wrong window. Note that pum_create_float_preview also uses win_set_buf, but from a glance, doesn't look like it properly checks for autocmds screwing things up (win_enter, nvim_create_buf...). I haven't addressed that here. Also adds some test coverage for nvim_open_win autocommands. Closes #27121.
| * fix(api): win_set_config fires unnecessary autocmdsSean Dewar2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: win_set_config should have the observable effect of moving an existing window to another place, but instead fires autocommands as if a new window was created and entered (and does not fire autocommands reflecting a "return" to the original window). Solution: do not fire win_enter-related autocommands when splitting the window, but continue to fire them when entering the window that fills the new space when moving a window to a different tabpage, as the new curwin changes. Also, remove "++once" from the WinEnter autocmd in the other test, as omitting it also crashed Nvim before this fix.
| * fix(api): win_set_config autocmds crash when moving win to other tabpageSean Dewar2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | Problem: win_enter autocommands can close new_curwin, crashing if it was the last window in its tabpage after removing win, or can close parent, crashing when attempting to split it later. Solution: remove win first, check that parent is valid after win_enter. NOTE: This isn't actually quite right, as this means win is not in the window list or even has a frame when triggering enter autocommands (so it's not considered valid in the tabpage). This is addressed in later commits.
* | docs: support inline markdownLewis Russell2024-03-09
| | | | | | | | | | | | - Tags are now created with `[tag]()` - References are now created with `[tag]` - Code spans are no longer wrapped
* | vim-patch:8.2.3915: illegal memory access when completing with invalid bytes ↵Raphael2024-03-09
| | | | | | | | | | | | | | | | | | | | (#27491) Problem: illegal memory access when completing with invalid bytes. Solution: Avoid going over the end of the completion text. vim/vim@4b28ba3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* | fix(startup): set full_screen when in ex_modeglepnir2024-03-09
|/ | | | | | | | Problem Description: In ex_mode, the default_grid.chars are not allocated, and subsequently, the w_grid.target in curwin is not allocated to default_grid in update_screen. This leads to a null pointer crash when the completion function is executed in ex_mode. Solution: Set full_screen when in ex_mode to ensure that default_grid is allocated.
* fix(fileio): fix off-by-one in rename_with_tmp (#27780)Colin Watson2024-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | `_FORTIFY_SOURCE` on Ubuntu caught this, resulting in: [OLDTEST] Running test_rename Failed: test_rename :: Nvim exited with non-zero code Job exited with code 134 Screen (23 lines) ================================================================================ "test_rename.vim" "test_rename.vim" 120L, 3623B Executing Test_rename_copy() Executing Test_rename_dir_to_dir() Executing Test_rename_fails() Error detected while processing command line..script /<<BUILDDIR>>/neovim-0.9.5/test/old/testdir/runtest.vim[437]..function RunTheTest[44]..Test_rename_fails: line 17: E730: using List as a String line 18: E976: using Blob as a String Executing Test_rename_file_ignore_case()*** buffer overflow detected ***: terminated `snprintf`'s second parameter should be no greater than the number of remaining bytes in the allocated object. We can see that this was off by one, because in the simple case where `tail == tempname` (for a file in the current directory), `rename_with_tmp` was passing `MAXPATHL + 2` for an object allocated with a size of only `MAXPATHL + 1`. Introduced in 5f1a153831d480180b2203120cff776d771ec1a4.
* refactor(ui): remove outdated UI vs UIData distinctionbfredl2024-03-08
| | | | | | | | Just some basic spring cleaning. In the distant past, not all UI:s where remote UI:s. They still aren't, but both of the "UI" and "UIData" structs are now only for remote UI:s. Thus join them as "RemoteUI".
* Merge pull request #27655 from bfredl/mpack_objbfredl2024-03-08
|\ | | | | refactor(msgpack): allow flushing buffer while packing msgpack
| * refactor(msgpack): allow flushing buffer while packing msgpackbfredl2024-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, we needed to always pack an entire msgpack_rpc Object to a continous memory buffer before sending it out to a channel. But this is generally wasteful. it is better to just flush whatever is in the buffer and then continue packing to a new buffer. This is also done for the UI event packer where there are some extra logic to "finish" of an existing batch of nevents/ncalls. This doesn't really stop us from flushing the buffer, just that we need to update the state machine accordingly so the next call to prepare_call() always will start with a new event (even though the buffer might contain overflow data from a large event).
* | vim-patch:8.2.5077: various warnings from clang on MS-Windows (#27773)zeertzjq2024-03-08
| | | | | | | | | | | | | | | | Problem: Various warnings from clang on MS-Windows. Solution: Avoid the warnings. (Yegappan Lakshmanan, closes vim/vim#10553) https://github.com/vim/vim/commit/a34b4460c2843c67a35a2d236b01e6cb9bc38734 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | fix(process): avoid potential data race on exit (#27769)zeertzjq2024-03-08
| | | | | | | | | | On exit, pty_process_close() may be called after pty_process_finish1() but before start_wait_eof_timer(), in which case the timer shouldn't be started because pty_process_close() has already closed it.
* | vim-patch:9.1.0158: 'shortmess' "F" flag doesn't work properly with 'autoread'zeertzjq2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | Problem: 'shortmess' "F" flag doesn't work properly with 'autoread' (after 9.1.0154) Solution: Hide the file info message instead of the warning dialog (zeertzjq) closes: vim/vim#14159 closes: vim/vim#14158 https://github.com/vim/vim/commit/8a01744c563f615ae7f6b3ab7f5208214a45a8e2
* | vim-patch:9.1.0154: shm=F not respected when reloading buffer with 'autoread'zeertzjq2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | Problem: shm=F not respected when reloading buffer with 'autoread' Solution: Check SHM_FILEINFO in buf_check_timestamp() (Shougo Matsushita) closes: vim/vim#14144 https://github.com/vim/vim/commit/9db39b0ec90600bb41faec3a12b934b17c298b1f Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* | vim-patch:9.1.0157: Duplicate assignment in f_getregion() (#27766)zeertzjq2024-03-08
| | | | | | | | | | | | | | | | | | Problem: Duplicate assignment in f_getregion(). Solution: Remove the duplicate assignment. Also improve getregion() docs wording and fix an unrelated typo (zeertzjq) closes: vim/vim#14154 https://github.com/vim/vim/commit/0df8f93bdaea77a1afb9f4eca94fe67ec73e6df2
* | fix(process): close handles and timer in pty_process_close() (#27760)zeertzjq2024-03-07
|/ | | This should prevent use-after-free on exit on Windows.
* vim-patch:9.1.0155: can only get getregion() from current buffer (#27757)zeertzjq2024-03-07
| | | | | | | | | | | Problem: can only call getregion() for current buffer Solution: Allow to retrieve selections from different buffers (Shougo Matsushita) closes: vim/vim#14131 https://github.com/vim/vim/commit/84bf6e658da51126bdd2e50af1f40cabd149343f Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* fix(eval): make has('pythonx') work properly (#27739)zeertzjq2024-03-05
| | | | Problem: has('pythonx') always returns 1. Solution: Make it the same as has('python3').
* fix(ui_client): check return value of channel_job_start (#27729)Sean Dewar2024-03-04
| | | | | | | | | | | | Problem: null pointer member access in ui_client_start_server if channel_job_start returns NULL. Solution: check for it, return 0 in that case (which is already used to indicate failure and is handled by main). Happened on Linux when trying to run Nvim in an old gdbserver instance after having rebuilt Nvim since. This gave E903 (the nvim binary was deleted, so " (deleted)" appears as a suffix in the `v:progpath`, making it invalid), then ASAN complains due to the NPD; instead it now then prints "Failed to start Nvim server!", as expected.
* fix(eval): correct failure return value for readfile/blob (#27722)Sean Dewar2024-03-03
| | | | | Currently returns 0 on failure, but should return an empty list (or blob). Regressed in the big blob port of '21 (#15211).
* fix(column): full redraw with 'stc, 'rnu' and inserted lines (#27712)luukvbaal2024-03-03
| | | | Problem: Text is not redrawn with 'relativenumber' when only the 'statuscolumn' is redrawn after inserted lines. Solution: Force a full redraw if statuscolumn width changed.
* Merge pull request #27687 from luukvbaal/floatposbfredl2024-03-02
|\ | | | | fix(float): allow floating window in cmdline area
| * fix(float): allow floating window in cmdline areaLuuk van Baal2024-03-01
| | | | | | | | | | Problem: Floats are arbitrarily positioned at 1 row above screen size. Solution: Position at 1 row above 'cmdheight', only if window is hidden behind the message area.
* | vim-patch:9.1.0146: v:echospace wrong with invalid value of 'showcmdloc' ↵zeertzjq2024-03-02
| | | | | | | | | | | | | | | | | | | | | | (#27697) Problem: v:echospace wrong after setting invalid value to 'showcmdloc'. Solution: Only call comp_col() if value is valid. (zeertzjq) closes: vim/vim#14119 https://github.com/vim/vim/commit/c27fcf4857228bc650943246ffbba444a085b3e7
* | vim-patch:87410ab3f556 (#27696)zeertzjq2024-03-02
|/ | | | | | | | | runtime(doc): some improvements to getregion() docs (vim/vim#14122) - Mention the default selection behavior - Remove useless sentence - Correct description about space padding https://github.com/vim/vim/commit/87410ab3f556121dfb3b30515f40c5f079edd004
* vim-patch:9.1.0145: v:echospace not correct when 'showcmdloc' != last (#27682)zeertzjq2024-03-01
| | | | | | | | | | | | | Problem: the amount of available space (v:echospace) on the command line is not correct when showcmdloc is drawn into the statusline or tabline. Solution: only add SHOWCMD_COLS to the shown command column when 'showcmdloc' is set to last (Sam-programs) closes: vim/vim#14108 https://github.com/vim/vim/commit/062141b1a70cf5364e6983ec901282e0111745c1 Co-authored-by: Sam-programs <130783534+Sam-programs@users.noreply.github.com>
* docs(eval): getline and indent function support string typeglepnir2024-02-29
| | | | | | Problem: getline and indent function missing string type in param. Solution: add string type in eval gen.
* vim-patch:9.1.0143: [security]: autocmd causes use-after-free in ↵zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set_curbuf() (#27664) Problem: [security]: autocmd cause use-after-free in set_curbuf() (kawarimidoll) Solution: check side-effect of BufLeave autocommand, when the number of windows changed, close windows containing buffers that will be wiped, if curbuf changed unexpectedly make sure b_nwindows is decremented otherwise it cannot be wiped set_curbuf() already makes some efforts to ensure the BufLeave autocommands do not cause issues. However there are still 2 issues that are not taken care of: 1) If a BufLeave autocommand opens a new window containing the same buffer as that is going got be closed in close_buffer() a bit later, we suddenly have another window open, containing a free'd buffer. So we must check if the number of windows changed and if it does (and the current buffer is going to be wiped (according to the 'bufhidden' setting), let's immediately close all windows containing the current buffer using close_windows() 2) If a BufLeave autocommand changes our current buffer (displays it in the current window), buf->b_nwindow will be incremented. As part of set_curbuf() we will however enter another buffer soon, which means, the newly created curbuf will have b_nwindows still have set, even so the buffer is no longer displayed in a window. This causes later problems, because it will no longer be possible to wipe such a buffer. So just before entering the final buffer, check if the curbuf changed when calling the BufLeave autocommand and if it does (and curbuf is still valid), decrement curbuf->b_nwindows. Both issues can be verified using the provided test (however the second issue only because such an impacted buffer won't be wiped, causing futher issues in later tests). fixes: vim/vim#13839 closes: vim/vim#14104 https://github.com/vim/vim/commit/55f8bba73be5f9c3a5a4d0d6c5f56e65f2c7d3fc Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.0142: getregion() can be improved (#27662)zeertzjq2024-02-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: getregion() can be improved (after v9.1.120) Solution: change getregion() implementation to use pos as lists and one optional {opt} dictionary (Shougo Matsushita) Note: The following is a breaking change! Currently, the getregion() function (included as of patch v9.1.120) takes 3 arguments: the first 2 arguments are strings, describing a position, arg3 is the type string. However, that is slightly inflexible, there is no way to specify additional arguments. So let's instead change the function signature to: getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists. This is slightly cleaner, and gives us the flexibility to specify additional arguments as key/value pairs to the optional Dict arg. Now it supports the "type" key to specify the selection type (characterwise, blockwise or linewise) and now in addition one can also define the selection type, independently of what the 'selection' option actually is. Technically, this is a breaking change, but since the getregion() Vimscript function is still quite new, this should be fine. closes: vim/vim#14090 https://github.com/vim/vim/commit/19b718828d8d5fab52d94c6cdba694641879ab38 Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
* vim-patch:9.1.0141: Put in Visual mode wrong if it replaces fold marker (#27661)zeertzjq2024-02-29
| | | | | | | | | | Problem: Put in Visual mode wrong if it replaces fold marker. Solution: Temporarily disable folding during put in Visual mode. (zeertzjq) fixes: vim/vim#14097 closes: vim/vim#14100 https://github.com/vim/vim/commit/4e141c66b9104136ddcf9cc240d2fbc83d825a5a
* refactor(metadata): generate all metadata in luabfredl2024-02-28
| | | | | | | | Then we can just load metadata in C as a single msgpack blob. Which also can be used directly as binarly data, instead of first unpacking all the functions and ui_events metadata to immediately pack it again, which was a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object` which will get yak shaved in the next PR)
* vim-patch:9.1.0140: cursor on wrong row after 1 char 'below' virtual text ↵zeertzjq2024-02-28
| | | | | | | | | | | | | | | | | | | | when EOL is shown (#27651) Problem: The cursor screen row was incorrectly being calculated when the cursor follows a 1 character text_align 'below' virtual text line, resulting in the cursor being shown on the wrong line. This was caused by a cell size of 2 instead of 1 being used for the EOL character, which propagated to the calculation of space for putting the 'below' virtual text on its own line. (rickhowe) Solution: Fix the size used for the EOL character in calculating the cursor's screen position (Dylan Thacker-Smith) fixes: vim/vim#11959 related: vim/vim#12028 closes: vim/vim#14096 https://github.com/vim/vim/commit/da0c9137d1ec96f4d79b818502d2f921a21f710e Co-authored-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
* feat(docs): replace lua2dox.luaLewis Russell2024-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The documentation flow (`gen_vimdoc.py`) has several issues: - it's not very versatile - depends on doxygen - doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C. - The intermediate XML files and filters makes it too much like a rube goldberg machine. Solution: Re-implement the flow using Lua, LPEG and treesitter. - `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic. - `lua2dox.lua` is gone! - No more XML files. - Doxygen is now longer used and instead we now use: - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`). - LPEG for C parsing (see `scripts/cdoc_parser.lua`) - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`). - Treesitter for Markdown parsing (see `scripts/text_utils.lua`). - The generated `runtime/doc/*.mpack` files have been removed. - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly. - Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
* docs: fix type of setreg() argument {options} (#27631)Maria José Solano2024-02-27
|
* vim-patch:9.1.0137: <Del> in cmdline mode doesn't delete composing chars ↵zeertzjq2024-02-27
| | | | | | | | | | (#27636) Problem: <Del> in cmdline mode doesn't delete composing chars Solution: Use mb_head_off() and mb_ptr2len() (zeertzjq) closes: vim/vim#14095 https://github.com/vim/vim/commit/ff2b79d23956263ab0120623c37e0b4498be01db
* refactor(msgpack): remove dead unpacker code in helpersbfredl2024-02-26
| | | | | Unpacker code now lives in unpacker.c This was part of the old unpacker which I forgor to remove.
* Merge pull request #27599 from bfredl/nofileallocbfredl2024-02-26
|\ | | | | refactor(fileio): remove API shell layer encouraging unnecessary allocations
| * refactor(shada): devirtualize writerbfredl2024-02-25
| | | | | | | | | | | | writer is only ever used with FileDescriptor. We already have separate code paths for serializing shada data into memory, see shada_encode_regs() and friends
| * refactor(fileio): remove API shell layer encouraging unnecessary allocationsbfredl2024-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functions like file_open_new() and file_open_fd_new() which just is a wrapper around the real functions but with an extra xmalloc/xfree around is an anti-pattern. If the caller really needs to allocate a FileDescriptor as a heap object, it can do that directly. FileDescriptor by itself is pretty much a pointer, or rather two: the OS fd index and a pointer to a buffer. So most of the time an extra pointer layer is just wasteful. In the case of scriptin[curscript] in getchar.c, curscript used to mean in practice: N+1 open scripts when curscript>0 zero or one open scripts when curscript==0 Which means scriptin[0] had to be compared to NULL to disambiguate the curscript=0 case. Instead, use curscript==-1 to mean that are no script, then all pointer comparisons dissappear and we can just use an array of structs without extra pointers.
* | fix(mbyte): fix bugs in utf_cp_*_off() functionsVanaIgr2024-02-26
| | | | | | | | | | | | Problems: - Illegal bytes after valid UTF-8 char cause utf_cp_*_off() to fail. - When stream isn't NUL-terminated, utf_cp_*_off() may go over the end. Solution: Don't go over end of the char of end of the string.
* | fix(process): start pty process eof timer on main thread (#27625)zeertzjq2024-02-26
|/
* docs: fix several misleading and superfluous wordings (#27609)Evgeni Chasnovski2024-02-25
|
* vim-patch:9.1.0131: buffer-completion may not always find all matches (#27610)zeertzjq2024-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: buffer-completion code too complicated and does not always find all matches (irisjae) Solution: do not try to anchor pattern to beginning of line or directory-separator, always return all matches Note: we are considering the non-fuzzy buffer-matching here. Currently, the buffer-completion code makes 2 attempts to match a pattern against the list of available patterns. First try is to match the pattern and anchor it to either the beginning of the file name or at a directory-separator (// or \\). When a match is found, Vim returns the matching buffers and does not try to find a match anywhere within a buffer name. So if you have opened two buffers like /tmp/Foobar.c and /tmp/MyFoobar.c using `:b Foo` will only complete to the first filename, but not the second (the same happens with `getcompletion('Foo', 'buffer')`). It may make sense, that completion priorities buffer names at directory boundaries, but it inconsistent, may cause confusion why a certain buffer name is not completed when typing `:b Foo<C-D>` which returns only a single file name and then pressing Enter (to switch to that buffer), Vim will error with 'E93: More than one match for Foo'). Similar things may happen when wiping the /tmp/Foobar.c pattern and afterwards the completion starts completing other buffers. So let's simplify the code and always match the pattern anywhere in the buffer name, do not try to favor matches at directory boundaries. This is also simplifies the code a bit, we do not need to run over the list of buffers several times, but only twice. fixes vim/vim#13894 closes: vim/vim#14082 https://github.com/vim/vim/commit/0dc0bff000fd804c6b0778ccc4554a4e4c82c8c9 Cherry-pick test_cmdline.vim from patch 9.1.0019 as it already passes. Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:9.1.0132: "C" doesn't include composing chars with 'virtualedit' ↵zeertzjq2024-02-24
| | | | | | | | | | | | | (#27605) Problem: using "C" and 've=all' set, doesn't include composing chars when changing a line, keeps the composing chars for whatever is typed afterwards. Solution: Use mb_head_off() and mb_ptr2len() instead of mb_tail_off(). (zeertzjq) closes: vim/vim#14083 https://github.com/vim/vim/commit/048761bcd40ec630fd3e039f0066cf4e484ceabd
* vim-patch:9.1.0129: Fix truncation of text_wrap 'wrap' virt text after EOL ↵zeertzjq2024-02-24
| | | | | | | | | | | | | | | | | | | | | | list char (#27600) Problem: Virtual text with text_wrap 'wrap' was effectively being truncated by a break conditional on the EOL list character being added to the screen line. (BigPeet) Solution: Remove the condition that was leading to the early break and instead fix a similar but incorrectly written outer condition that checks if there is more to add at the end of the screen line. (Dylan Thacker-Smith) Also, related: - update comment in win_line() - remove no longer necessary at_end_str variable in win_line() fixes: vim/vim#12725 closes: vim/vim#14079 https://github.com/vim/vim/commit/f548ae7b6357c7934411df243bc987800c9b76d1 Co-authored-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
* vim-patch:a35235e824bb (#27598)zeertzjq2024-02-24
| | | | | | | | | runtime(doc) Update help text for matchbufline() and matchstrlist() closes: vim/vim#14080 https://github.com/vim/vim/commit/a35235e824bb77df0cebdb2bd290e13f1201b292 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>