aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/window.h
Commit message (Collapse)AuthorAge
* refactor(ctx): drop switch_win/restore_win #40693Justin M. Keyes2026-07-11
|
* refactor: unify context-switching conceptsJustin M. Keyes2026-07-10
|
* 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>
* 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.
* 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: split WIN_EXECUTE() into two functions (#26627)zeertzjq2023-12-18
|
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
|
* build(IWYU): replace most private mappings with pragmas (#26247)zeertzjq2023-11-27
|
* refactor: replace manual header guards with #pragma oncedundargoc2023-11-12
| | | | | It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard.
* 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
* refactor: fix IWYU mapping file and use IWYU (#21802)dundargoc2023-01-15
| | | Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
* refactor: replace char_u with char 17 - remove STRLCPY (#21235)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.1.2001: some source files are too big (#21231)zeertzjq2022-11-29
Problem: Some source files are too big. Solution: Move buffer and window related functions to evalbuffer.c and evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898) https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e