aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/window.c
Commit message (Collapse)AuthorAge
* refactor(multicursor): view/extmark/region logic #42030Justin M. Keyes2026-09-21
| | | | | | | | | | Problem: Redundant logic. Solution: Deduplicate. Also: `winrestview()` no longer forces a status-line redraw and resending `win_pos` (`win_new_width()` on unchanged width).
* vim-patch: num -> bool patches #41375Justin M. Keyes2026-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: - 8.2.1614 also flips searchcount()'s "recompute" default to FALSE; - 8.2.1620 flips it back, so the default stays true here. vim-patch:8.2.1601: Vim9: cannot use 'true" with garbagecollect() https://github.com/vim/vim/commit/2df47310422f4a77e85de7901a5299923a1addd3 vim-patch:8.2.1602: Vim9: cannot use 'true" with getbufinfo() https://github.com/vim/vim/commit/036c2cf719e3de445779a275514030be66e26883 vim-patch:8.2.1603: Vim9: cannot use "true" with getchar() https://github.com/vim/vim/commit/c08cc72947fdfab484f53c5d9bbea662bc5a9c8f vim-patch:8.2.1604: Vim9: cannot use "true" with getcompletion() https://github.com/vim/vim/commit/d217a87755ba01fc626b1c178c682fcd05ab3a28 vim-patch:8.2.1614: Vim9: cannot pass "true" to searchcount() https://github.com/vim/vim/commit/597aaac9d2b090e0eb738ab4e2afd454b7b92393 vim-patch:8.2.1615: Vim9: cannot pass "true" to searchdecl() https://github.com/vim/vim/commit/30788d3d37a90b0702d94b7272ed26672534ba6f vim-patch:8.2.1616: Vim9: cannot pass "true" to synID() https://github.com/vim/vim/commit/fcb6d7082d563acc33866b3d3a659c32ad19a9e1 vim-patch:8.2.1617: Vim9: cannot pass "true" to win_splitmove() https://github.com/vim/vim/commit/4b9bd692bdffba03fda04f9979e25431b53e416b vim-patch:8.2.1619: Vim9: cannot pass "true" to spellsuggest() https://github.com/vim/vim/commit/7c27f337bf278babc1ccdcb66ac975f115d660b7 vim-patch:8.2.1620: searchcount() test fails https://github.com/vim/vim/commit/4140c4f3fff1a441f2837f2f911ab0f0368e412a N/A patches: vim-patch:8.2.1606: has() takes no second argument in Nvim https://github.com/vim/vim/commit/04637e243d39f791cfc97c3ce96d99ef1bf047e1 vim-patch:8.2.1610: list2str()/str2list() take no "utf8" argument https://github.com/vim/vim/commit/a48f786787e8e070c1a611146fd1f0f7e141e60a vim-patch:8.2.1611: nr2char() ignores its "utf8" argument https://github.com/vim/vim/commit/ed6a430fae72c077ec106c9620379b69cfec3035
* fix(ui2): `:$q` should not target hidden windows #40992Rob Pilling2026-08-02
| | | | | | | | | | | | | | | | | | | | | | | Similar to #36123, the ui2 windows confuse `:$q`, which doesn't close the last window on the tab, but targets a hidden ui2 window. The problem seems to be a combination of using `FOR_ALL_WINDOWS_IN_TAB()`, which includes hidden windows, and then counting the windows without factoring in `win_has_winnr()`. There are examples of using `win_has_winnr()`, such as: - [`eval/buffer.c`'s `buf_win_common()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/eval/buffer.c#L474-L475) - [`eval/window.c`'s `f_getwininfo()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/eval/window.c#L130-L135) - [`window.c`'s `win_get_tabwin()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/window.c#L7860-L7869) But possibly problematic ones: - `ex_docmd.c`'s: - [`invalid_range()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/ex_docmd.c#L3891-L3893) - ^ should this include hidden windows? Can a user address them by number? `win_has_winnr()` suggests not - [`ex_close()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/ex_docmd.c#L5233-L5244) - [`ex_hide()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/ex_docmd.c#L5478-L5484) - `eval/window.c`'s: - [`f_winrestcmd()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/eval/window.c#L797-L808) - [`find_win_by_nr()`](https://github.com/neovim/neovim/blob/4a5062cda69fa6cb59b7dc0c488dfb05accf99de/src/nvim/eval/window.c#L172-L180)
* refactor(globals): group Visual-mode globals in VisualState #40777Justin M. Keyes2026-07-16
|
* refactor(ctx): drop switch_win/restore_win #40693Justin M. Keyes2026-07-11
|
* refactor(cmdpreview): lift undo-checkpoint codeJustin M. Keyes2026-07-10
| | | | | This is a mechanical lift of undo save-and-restore logic into... the module that owns undo.
* refactor: unify context-switching conceptsJustin M. Keyes2026-07-10
|
* build: lint "strtol" #40442Justin M. Keyes2026-06-28
| | | | | | | | | | | | | | | | | | Problem: No lint for strtol(). Solution: Add lint, and update existing usages. Callers that previously got a (garbage) large positive value: - `indent.c`: use getdigits() (intmax, no int truncation) with def=1 so overflow/too-large values stay positive and fall through to the existing "too big" check (E475). - `file_search.c`: use getdigits() with def=255 so overflow/too-large values keep the "max expand" (else) branch. The other conversions (api/command.c, eval/window.c, highlight_group.c, tui/tui.c) only diverge on pathological overflow inputs where strtol's result was already garbage and the observable outcome is unchanged.
* feat(cmdwin): implement cmdwin as a normal buf+winJustin M. Keyes2026-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cmdwin (the `:q` cmdline buffer) has various limitations which require special-casing all over the codebase. Besides complicating the code, it also breaks async plugins if they try to create buffers/windows after some work is done, if the user happens to open cmdwin at the wrong the moment: Lua callback: …/guh.nvim/lua/guh/util.lua:531: E11: Invalid in command-line window; <CR> executes, CTRL-C quits stack traceback: [C]: in function 'nvim_buf_delete' …/guh.nvim/lua/guh/util.lua:531: in function <…/guh.nvim/lua/guh/util.lua:526> Solution: Just say no to "inception". Reimplement cmdwin as a normal buffer+window. All of the cmdwin contortions (in both core, and innocent plugins) exist literally only to support "inception": recursive cmdwin-in-cmdline-things, like `<c-r>=`, `/`, search-during-substitute, `:input()`, etc. So we just won't support that (though I have a potential plan for that later, which I call "modal parking lot"). The benefit is that plugins, and core, no longer have to care about cmdwin. BONUS: - mouse-drag on vertical separators works (it only worked for horizontal/statusline before) - inccommand-in-cmdwin now works correctly, for free (thus don't need #40077). POTENTIAL FOLLOWUPS - Drop `CHECK_CMDWIN` ("E11: Invalid in command-line window"), allow chaos. - Unify `BUFLOCK_OK` / `LOCK_OK` ? DESIGN: - Eliminate lots of C globals, `EX_CMDWIN`, etc. - `text_locked()` no longer reports true for cmdwin. - cmdwin = a normal window with 'winfixbuf', 'bufhidden=wipe', 'buftype=nofile'. Invariants come from those options rather than special cases throughout the codebase. - `nv_record` for q:/q//q? calls Lua `nlua_call_vimfn("vim._core.cmdwin", …)`. No `K_CMDWIN` / cmdline-reader detour. - `cedit_key` (`c_CTRL-F`) schedules a deferred event that calls `vim._core.cmdwin.open(type, content, pos)` and returns `Ctrl_C` so the in-flight cmdline cancels. Reader state is not serialized; instead the captured `(type, line, col)` is replayed via `nvim_feedkeys(type..line.."<CR>", "nt", …)` after user confirms. - On confirm/cancel: `<CR>` / `<C-C>` calls into Lua which closes the window and re-feeds the cmdline. BREAKING CHANGES: - Expression-register cmdline (`<C-R>=` from insert-mode) no longer supports cmdwin. Same applies to `input()` / `inputlist()` (already covered by `text_locked`). - Usage of cmdwin in macros/mappings will probably break (assuming they ever worked).
* vim-patch:8.2.2245: Vim9: return value of winrestcmd() cannot be executedJan Edmund Lazo2026-04-18
| | | | | | | | | Problem: Vim9: return value of winrestcmd() cannot be executed. Solution: Put colons before each range. (closes vim/vim#7571) https://github.com/vim/vim/commit/285b15fce164ade8b1537b884cc15aebaa60e9ef Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: move e_invalwindow to errors.h (#39067)glepnir2026-04-15
| | | | | Problem: e_invalwindow was a static local, inconsistent with other error strings. Solution: Convert it to EXTERN/INIT style and move it to errors.h.
* vim-patch:partial:9.2.0068: Inefficient use of list_append_string() (#38083)zeertzjq2026-02-27
| | | | | | | | | | | | | | | | | Problem: Inefficient use of list_append_string() Solution: Pass string length to list_append_string() where it is known (John Marriott). closes: vim/vim#19491 https://github.com/vim/vim/commit/455d62e38a75572bccc43e42d20b5db3c4b22ec3 N/A patches: vim-patch:9.2.0063: memory leak in type_name_list_or_dict() vim-patch:9.2.0065: memory leak in invoke_sync_listeners() vim-patch:9.2.0066: memory leak in build_drop_cmd() vim-patch:9.2.0067: memory leak in dict_extend_func() Co-authored-by: John Marriott <basilisk@internode.on.net>
* vim-patch:9.1.2138: win_execute() and 'autochdir' can corrupt buffer name ↵zeertzjq2026-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#37767) Problem: With 'autochdir' win_execute() can corrupt the buffer name, causing :write to use wrong path. Solution: Save and restore b_fname when 'autochdir' is active (Ingo Karkat). This is caused by a bad interaction of the 'autochdir' behavior, overriding of the current directory via :lchdir, and the temporary window switching done by win_execute(), manifesting when e.g. a custom completion inspects other buffers: 1. In the initial state after the :lcd .. we have curbuf->b_fname = "Xsubdir/file". 2. do_autochdir() is invoked, temporarily undoing the :lcd .., changing back into the Xsubdir/ subdirectory. 3. win_execute() switches windows, triggering win_enter_ext() → win_fix_current_dir() → shorten_fnames(TRUE) 4. shorten_fnames() processes *all* buffers 5. shorten_buf_fname() makes the filename relative to the current (wrong) directory; b_fname becomes "file" instead of "Xsubdir/file" 6. Directory restoration correctly restores working directory via mch_chdir() (skipping a second do_autochdir() invocation because apply_acd is FALSE), but b_fname remains corrupted, with the "Xsubdir/" part missing. 7. expand("%:p") (and commands like :write) continue to use the corrupted filename, resolving to a wrong path that's missing the "Xsubdir/" part. To fix the problem the short filename is saved if its in effect (i.e. pointed to by curbuf->b_fname) and 'autochdir' happened. It's then restored in case of a local cwd override. The conditions limit this workaround to when 'autochdir' is active *and* overridden by a :lchdir. closes: vim/vim#19343 https://github.com/vim/vim/commit/abb4d740338e667991656e3ca575e623aba7bd2a Co-authored-by: Ingo Karkat <swdev@ingo-karkat.de>
* vim-patch:partial:9.1.2044: Inefficient use of ga_concat() (#37209)zeertzjq2026-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Inefficient use of ga_concat() Solution: Use ga_concat_len() when the length is already known to avoid use of strlen() (John Marriott). Additionally the following changes are done: os_unix.c: - in function `socket_server_list_sockets()` use a `string_T` for the strings `buf` and `path` for use in `ga_concat_len()` and drop un-needed variable `dir`. quickfix.c: - in function `qf_jump_print_msg()` use a `string_T` for the string `IObuff` for use in `ga_concat_len()`. - in function `qf_range_text()` use a `string_T` for the string `buf` for use in `ga_concat_len()`. register.c: - simplify function `execreg_line_continuation()`. terminal.c: - in function `read_dump_file()` use a `string_T` for the string `prev_char` for use in `ga_concat_len()`. tuple.c: - in function `tuple_join_inner()` use a `string_T` for the string `s` for use in `ga_concat_len()`. Also, change local struct `join_T` to use `string_T`. vim9type.c: - in functions `type_name_tuple()` and `type_name_func()` use a `string_T` for the string `arg_type` for use in `ga_concat_len()`. closes: vim/vim#19038 https://github.com/vim/vim/commit/a7e671fbb9fa2af9ad6c4ba9a7a881df431cd02b Skip tuple. Co-authored-by: John Marriott <basilisk@internode.on.net>
* vim-patch:8.2.2198: ml_get error when resizing window and using text propertyJan Edmund Lazo2026-01-01
| | | | | | | | | | | | | | | Problem: ml_get error when resizing window and using text property. Solution: Validate botline of the right window. (closes vim/vim#7528) https://github.com/vim/vim/commit/23999d799cfe844b604f193183f8f84052c8e746 Migrate to Vim's (in)validate_botline_win() API. Nvim wants to pass "curwin" instead of hiding them behind alias/macro/inline-function. https://github.com/neovim/neovim/pull/37164#discussion_r2655006908 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4785: Visual mode not stopped if win_gotoid() goes to other ↵zeertzjq2025-12-22
| | | | | | | | | | | buffer (#37073) Problem: Visual mode not stopped early enough if win_gotoid() goes to another buffer. (Sergey Vlasov) Solution: Stop Visual mode before jumping to another buffer. (closes vim/vim#10217) https://github.com/vim/vim/commit/3aca0916f0dba6114ae0f7d5458763a934fe7a02 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.1944: getwininfo() does not return if statusline is visible ↵zeertzjq2025-12-05
| | | | | | | | | | | | | (#36828) Problem: gewininfo() does not return if statusline is visible Solution: Add status_height to the dict items returned by getwininfo() (Hirohito Higashi) closes: vim/vim#18841 https://github.com/vim/vim/commit/a04ab5f04c1a9e794ed45ff5f8f7e1f9c5e1a535 Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* fix(eval): winnrs of unfocusable/hidden windows #35474Sean Dewar2025-08-26
| | | | | | | | | Problem: various functions may return incorrect window numbers for unfocusable or hidden windows. Solution: fix the checks. Make sure current windows in non-current tabpages have a window number. Fixes #35453
* vim-patch:8.1.2371: FEAT_TEXT_PROP is a confusing name (#35466)Jan Edmund Lazo2025-08-25
| | | | | | | | | | | | | Problem: FEAT_TEXT_PROP is a confusing name. Solution: Use FEAT_PROP_POPUP. (Naruhiko Nishino, closes vim/vim#5291) https://github.com/vim/vim/commit/05ad5ff0ab34ed9a5296dedd420ca81698b8ce22 textprop,popuwin remain N/A features. getchar.c has the relevant code changes. Port runtest.vim changes from patch v8.1.1561. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guardsbfredl2025-08-14
| | | | | | | | | These are not needed after #35129 but making uncrustify still play nice with them was a bit tricky. Unfortunately `uncrustify --update-config-with-doc` breaks strings with backslashes. This issue has been reported upstream, and in the meanwhile auto-update on every single run has been disabled.
* fix(eval): winnr('$') counts non-current hidden/unfocusable windows #34207luukvbaal2025-06-01
| | | | | | | | | | | Problem: Non-visible/focusable windows are assigned a window number, whereas commands that use this window number skip over them. Solution: Skip over non-visible/focusable windows when computing the window number, unless it is made the current window through the API in which case an identifiable window number is still useful. This also ensures it matches the window number of the window entered by `<winnr>wincmd w` since 403fcacf.
* refactor(ui): separate types for allocated grids and viewportsbfredl2025-04-28
|
* refactor: iwyu #31637Justin M. Keyes2024-12-23
| | | Result of `make iwyu` (after some "fixups").
* vim-patch:9.1.0888: leftcol property not available in getwininfo() (#31349)zeertzjq2024-11-26
| | | | | | | | | | Problem: leftcol property not available in getwininfo() Solution: add leftcol property property (glepnir) closes: vim/vim#16119 https://github.com/vim/vim/commit/0a850673e3d4193d55f47bcbbc0b0da5f155307d Co-authored-by: glepnir <glephunter@gmail.com>
* fixup: apply the change on more filesJames Tirta Halim2024-06-04
|
* refactor: move shared messages to errors.h #26214Justin M. Keyes2024-06-01
|
* fix(api/buffer): fix handling of viewport of non-current bufferbfredl2024-03-13
| | | | | | | | | | | A lot of functions in move.c only worked for curwin, alternatively took a `wp` arg but still only work if that happens to be curwin. Refactor those that are needed for update_topline(wp) to work for any window. fixes #27723 fixes #27720
* vim-patch:9.1.0171: Small split-move related improvementsSean Dewar2024-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: small improvements can be made to split-move related functions. Solution: apply them (Sean Dewar): Some of these changes were already applied to Nvim. Here are the ones which were missing: - Improve some doc comments (frame_flatten should still work for non-current tabpages, despite the topframe check, which looks benign, though I'm unsure if it's still needed; see vim/vim#2467). - f_win_splitmove should check_split_disallowed on wp, not targetwin, as that's what win_splitmove checks (though it's probably unnecessary to check b_locked_split at all; see vim/vim#14109, which I hope to get around to finishing at some point). - Apply the winframe_restore comment changes, and remove win_comp_pos from after winframe_restore in win_splitmove, as it shouldn't be necessary (no need to remove it from nvim_win_set_config too, as it was already omitted). Move win_append after winframe_restore in win_splitmove to match Vim. closes: vim/vim#14185 https://github.com/vim/vim/commit/5cac1a9bee0798d70a7fd80363a1f697759638e8
* vim-patch:9.1.0169: current window number returned by tabpagewinnr may be ↵Sean Dewar2024-03-12
| | | | | | | | | | | | | | | | | | | outdated Problem: current window number returned by tabpagewinnr may be outdated when called from win_execute for the original tabpage. Solution: update the original tabpage's tp_curwin in switch_win; use {un}use_tabpage instead. Don't do it in restore_win to ensure tp_curwin of the temporarily visited tabpage is unchanged from switch_win visiting it, as before. (Sean Dewar) Maybe restore_win should only restore tp_curwin if `curtab == switchwin->sw_curtab`, in case the user changed tabpages from within win_execute, but not doing that is consistent with the old behaviour. related: vim/vim#14186 https://github.com/vim/vim/commit/e101028a5c896480c61fef7ea16855255925709b
* vim-patch:8.2.3862: crash on exit with EXITFREE and using win_execute()Sean Dewar2024-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash on exit with EXITFREE and using win_execute(). Solution: Also save and restore tp_topframe. (issue vim/vim#9374) https://github.com/vim/vim/commit/dab17a0689a2f31f69f428975f84b0c3c7ba3030 Couldn't repro the crash in the test, but I only care about this patch so switch_win sets topframe properly for win_split_ins in nvim_open_win and nvim_win_set_config. Add a test using nvim_win_call and :wincmd, as I couldn't repro the issue via nvim_open_win or nvim_win_set_config (though it's clear they're affected by this patch). That said, at that point, could just use {un}use_tabpage inside switch_win instead, which also updates tp_curwin (though maybe continue to not set it in restore_win). That would also fix possible inconsistent behaviour such as: :call win_execute(w, "let curwin_nr1 = tabpagewinnr(1)") :let curwin_nr2 = tabpagewinnr(1) Where it's possible for curwin_nr1 != curwin_nr2 if these commands are run from the 1st tabpage, but window "w" is in the 2nd (as the 1st tabpage's tp_curwin may still be invalid). I'll probably PR a fix for that later in Vim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.0128: win_gotoid() may abort even when not switching a windowSean Dewar2024-03-08
| | | | | | | | | Problem: win_gotoid() checks for textlock and other things when switching to a window that is already current (after v9.1.0119) Solution: return early with success when attempting to switch to curwin (Sean Dewar) https://github.com/vim/vim/commit/2a65e739447949a7aee966ce8a3b75521b2a79ea
* vim-patch:9.1.0119: can move away from cmdwin using win_splitmove()Sean Dewar2024-03-08
| | | | | | | | | | | | | Problem: can switch windows while textlocked via f_win_gotoid and f_win_splitmove (which also allows switching in the cmdwin). Solution: Check text_or_buf_locked in f_win_splitmove() (Sean Dewar) While at it, call text_or_buf_locked() in f_win_gotoid() instead of testing for cmdwin_type() (which text_buf_locked() does and in addition will also verify that the buffer is not locked). https://github.com/vim/vim/commit/f865895c874b0936b0563ebfef7490aac8cb8a1f
* vim-patch:9.1.0116: win_split_ins may not check available roomSean Dewar2024-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: win_split_ins has no check for E36 when moving an existing window Solution: check for room and fix the issues in f_win_splitmove() (Sean Dewar) https://github.com/vim/vim/commit/0fd44a5ad81ade342cb54d8984965bdedd2272c8 Omit WSP_FORCE_ROOM, as it's not needed for Nvim's autocmd window, which is floating. Shouldn't be difficult to port later if it's used for anything else. Make win_splitmove continue working for turning floating windows into splits. Move the logic for "unfloating" a float to win_split_ins; unlike splits, no changes to the window layout are needed before calling it, as floats take no room in the window layout and cannot affect the e_noroom check. Add missing tp_curwin-fixing logic for turning external windows into splits, and add a test. NOTE: there are other issues with the way "tabpage independence" is implemented for external windows; namely, some things assume that tp_curwin is indeed a window within that tabpage, and as such, functions like tabpage_winnr and nvim_tabpage_get_win currently don't always work for external windows (with the latter aborting!) Use last_status over frame_add_statusline, as Nvim's last_status already does this for all windows in the current tabpage. Adjust restore_full_snapshot_rec to handle this. This "restore everything" approach is changed in a future commit anyway, so only ensure it's robust enough to just pass tests. Keep check_split_disallowed's current doc comment, as it's actually a bit more accurate here. (I should probably PR Vim to use this one) Allow f_win_splitmove to move a floating "wp" into a split; Nvim supports this. Continue to disallow it from moving the autocommand window into a split (funnily enough, the check wasn't reachable before, as moving a float was disallowed), but now return -1 in that case (win_splitmove also returns FAIL for this, but handling it in f_win_splitmove avoids us needing to switch windows first). Cherry-pick Test_window_split_no_room fix from v9.1.0121. Update nvim_win_set_config to handle win_split_ins failure in later commits.
* vim-patch:9.1.0047: issues with temp curwin/buf while cmdwin is openSean Dewar2024-01-28
| | | | | | | | | | | | | | | | | Problem: Things that temporarily change/restore curwin/buf (e.g: win_execute, some autocmds) may break assumptions that curwin/buf is the cmdwin when "cmdwin_type != 0", causing issues. Solution: Expose the cmdwin's real win/buf and check that instead. Also try to ensure these variables are NULL if "cmdwin_type == 0", allowing them to be used directly in most cases without checking cmdwin_type. (Sean Dewar) Reset and save `cmdwin_old_curwin` in a similar fashion. Apply suitable changes for API functions and add Lua tests. https://github.com/vim/vim/commit/988f74311c26ea9917e84fbae608de226dba7e5f
* 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.
* refactor: follow style guidedundargoc2023-12-30
|
* docs: small fixes (#26651)dundargoc2023-12-28
| | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: WillLillis <wlillis@umass.edu>
* docs: add style rule regarding initializationdundargoc2023-12-18
| | | | | Specifically, specify that each initialization should be done on a separate line.
* refactor: split WIN_EXECUTE() into two functions (#26627)zeertzjq2023-12-18
|
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* refactor: rename types.h to types_defs.hdundargoc2023-11-27
|
* build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
|
* refactor: move some functions to winfloat.c (#26020)Raphael2023-11-16
|
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* refactor: reorganize option header files (#25437)zeertzjq2023-09-30
| | | | | | - Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other
* build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq2023-09-30
|
* refactor: remove longdundargoc2023-07-03
| | | | | long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
* vim-patch:9.0.0904: various comment and indent flaws (#23498)zeertzjq2023-05-06
|