summaryrefslogtreecommitdiffstatshomepage
path: root/src/nvim/window.h
AgeCommit message (Collapse)AuthorFiles
2026-01-17vim-patch:9.0.0909: error message for layout change does not match action ↵zeertzjq1
(#37436) Problem: Error message for layout change does not match action. Solution: Pass the command to where the error is given. (closes vim/vim#11573) https://github.com/vim/vim/commit/9fda81515b26ecd3c1e99f95334aaed3f7b6fea3 Thinking about this again, it's actually OK to check split_disallowed in window_layout_locked(), so add the check. Also add missing window_layout_locked() in tabpage_close(). Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-12-21vim-patch:9.1.2001: cursor may end up in wrong window after :botright copen ↵zeertzjq1
(#37056) Problem: After :botright copen and closing the quikfix window, the cursor ends up in the wrong window. The problem is fr_child always points to the first (leftmost for FR_ROW, topmost for FR_COL) child frame. When do :vsplit, the new window is created on the left, and frame_insert() updates the parent's fr_child to point to this new left window. Solution: Create a snapshot before open the quickfix window and restore it when close it (glepnir). closes: vim/vim#18961 https://github.com/vim/vim/commit/b43f9ded7e98261e3e662a8e919f54e7399b0316 Co-authored-by: glepnir <glephunter@gmail.com>
2025-08-14refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guardsbfredl1
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.
2025-01-06vim-patch:9.1.0993: New 'cmdheight' behavior may be surprising #31892luukvbaal1
Problem: Although patch 9.1.0990 fixed a real problem/inconsistency, it also introduced new behavior that may break BWC and/or be unexpected. Before 9.1.0990, window commands could make the topframe smaller (without changing 'cmdheight'; quirk that is now fixed), but did not allow extending the topframe beyond the 'cmdheight' set by the user. After 9.1.0990, the user can reduce the 'cmdheight' below the value they set explicitly, through window commands, which may lead to confusion. (aftere v9.1.0990) Solution: Store the value explicitly set by the user and clamp the 'cmdheight' when resizing the topframe. This also applies to dragging laststatus, which in contrast to window commands _did_ allow reducing the 'cmdheight' to values below the one set by the user. So with this patch there is still new behavior, but I think in a way that is less surprising. While at it, also fix a Coverity warning, introduced in v9.1.0990 (Luuk van Baal) https://github.com/vim/vim/commit/c97e8695353565d6b20adffa48aad47f6e09967f
2024-08-07vim-patch:partial:8.1.0914: code related to findfile() is spread out (#30000)zeertzjq1
Problem: Code related to findfile() is spread out. Solution: Put findfile() related code into a new source file. (Yegappan Lakshmanan, closes vim/vim#3934) https://github.com/vim/vim/commit/5fd0f5052f9a312bb4cfe7b4176b1211d45127ee Keep functions related to wildcard expansion in path.c, as in Vim they are now spread out among multiple files, which isn't really ideal.
2024-02-01feat(api): make nvim_open_win support non-floating windows (#25550)Will Hopkins1
Adds support to `nvim_open_win` and `nvim_win_set_config` for creating and manipulating split (non-floating) windows.
2023-12-16vim-patch:9.0.2168: Moving tabpages on :drop may cause an endless loop (#26605)zeertzjq1
Problem: Moving tabpages on :drop may cause an endless loop Solution: Disallow moving tabpages on :drop when cleaning up the arglist first Moving tabpages during drop command may cause an endless loop When executing a :tab drop command, Vim will close all windows not in the argument list. This triggers various autocommands. If a user has created an 'au Tabenter * :tabmove -' autocommand, this can cause Vim to end up in an endless loop, when trying to iterate over all tabs (which would trigger the tabmove autocommand, which will change the tpnext pointer, etc). So instead of blocking all autocommands before we actually try to edit the given file, lets simply disallow to move tabpages around. Otherwise, we may change the expected number of events triggered during a :drop command, which users may rely on (there is actually a test, that expects various TabLeave/TabEnter autocommands) and would therefore be a backwards incompatible change. Don't make this an error, as this could trigger several times during the drop command, but silently ignore the :tabmove command in this case (and it should in fact finally trigger successfully when loading the given file in a new tab). So let's just be quiet here instead. fixes: vim/vim#13676 closes: vim/vim#13686 https://github.com/vim/vim/commit/df12e39b8b9dd39056e22b452276622cb7b617fd Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-11-30refactor(IWYU): move typedefs out of globals.h (#26322)zeertzjq1
2023-11-29refactor: move some constants out of vim_defs.h (#26298)zeertzjq1
2023-11-28refactor: fix headers with IWYUdundargoc1
2023-11-28refactor: fix runtime_defs.h (#26259)zeertzjq1
2023-11-27refactor: rename types.h to types_defs.hdundargoc1
2023-11-27refactor: move Arena and ArenaMem to memory_defs.h (#26240)zeertzjq1
2023-11-12refactor: replace manual header guards with #pragma oncedundargoc1
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.
2023-10-23build(lint): remove unnecessary clint.py rulesdundargoc1
Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py.
2023-05-13refactor: remove typval.h from most header files (#23601)zeertzjq1
Because typval_defs.h is enough for most of them.
2023-01-15refactor: fix IWYU mapping file and use IWYU (#21802)dundargoc1
Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
2022-12-31fix(ui): allow resize commands to set 'cmdheight' to 0Luuk van Baal1
Resolve https://github.com/neovim/neovim/issues/21558
2022-11-29vim-patch:8.1.2001: some source files are too big (#21231)zeertzjq1
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
2022-11-15build: allow IWYU to fix includes for all .c filesdundargoc1
Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
2022-09-09refactor: replace char_u with charDundar Göc1
Work on https://github.com/neovim/neovim/issues/459
2022-09-01vim-patch:9.0.0342: ":wincmd =" equalizes in two directionszeertzjq1
Problem: ":wincmd =" equalizes in two directions. Solution: Make ":vertical wincmd =" equalize vertically only and ":horizontal wincmd =" equalize horizontally only. https://github.com/vim/vim/commit/21c3a80a7fd6b7fc250ce5dc287963511f54b86f
2022-03-13refactor: fix clint warnings (#17682)dundargoc1
2022-03-07vim-patch:8.2.4060: win_execute() slow on systems where getcwd()/chdir() is slowzeertzjq1
Problem: win_execute() is slow on systems where getcwd() or chdir() is slow. (Rick Howe) Solution: Avoid using getcwd() and chdir() if no local directory is used and 'acd' is not set. (closes vim/vim#9504) https://github.com/vim/vim/commit/d6f27c66cca32b93fcf8024b1bad1618946bbbea
2022-03-07vim-patch:8.2.3920: restoring directory after using another window is ↵zeertzjq1
inefficient Problem: Restoring directory after using another window is inefficient. Solution: Only restore the directory for win_execute(). Apply 'autochdir' only when needed. https://github.com/vim/vim/commit/90c317f2246a7fb4bd4e3feb0778b53627bc9fad
2022-02-03fix(api/nvim_win_call): share common win_execute logicSean Dewar1
We have to be sure that the bugs fixed in the previous patches also apply to nvim_win_call. Checking v8.1.2124 and v8.2.4026 is especially important as these patches were only applied to win_execute, but nvim_win_call is also affected by the same bugs. A lot of win_execute's logic can be shared with nvim_win_call, so factor it out into a common macro to reduce the possibility of this happening again.
2022-02-03vim-patch:8.2.4018: ml_get error when win_execute redraws with Visual selectionSean Dewar1
Problem: ml_get error when win_execute redraws with Visual selection. Solution: Disable Visual area temporarily. (closes vim/vim#9479) https://github.com/vim/vim/commit/18f4740f043b353abe47b7a00131317052457686 {switch_to/restore}_win_for_buf is N/A (marked as such in v8.0.0860; currently only used in Vim's if_py). Add a modeline to test_execute_func.vim.
2021-10-12refactor: format all C files under nvim/ #15977dundargoc1
* refactor: format all C files under nvim * refactor: disable formatting for Vim-owned files: * src/nvim/indent_c.c * src/nvim/regexp.c * src/nvim/regexp_nfa.c * src/nvim/testdir/samples/memfile_test.c
2017-04-22refactor/single-include: window.h, version.h (#6570)relnod1
2016-01-22window: Fix linter errors.Jurica Bradaric1
2016-01-22vim-patch:7.4.642Jurica Bradaric1
Problem: When using "gf" escaped spaces are not handled. Solution: Recognize escaped spaces. https://github.com/vim/vim/commit/d45c07ac7499358c5cb096cadb675ce74ae3eaf6
2014-07-12move defines from vim.hBrandon Coleman1
buffer.h: buflist_getfile() flags buflist_new() flags buf_freeall() flags do_buffer() flags charset.h: chartab[] flags edit.h: in_cinkeys() flags change_indent() flags beginline() flags insertchar() flags nv_mousescroll() flags eval.c AUTOLOAD_CHAR eval.h: enum for vimvars[] ex_cmds.h: do_ecmd read_viminfo flags ex_cmds2.h: check_changed() flags do_source() flags ex_cmds_defs.h: BAD_* flags ex_docmd.h: VALID_PATH VALID_HEAD EXMODE_* do_cmdline() flags added include ex_getln.c *_ESC_CHARS definitions ex_getln.h: history table flags - used by add_to_history() fileio.h: readfile() flags event_T definition getchar.h: ins_typebuf() flags KEYLEN_* globals.h: NO_SCREEN NO_BUFFERS SEA_* defines current_SID flags hlf_T enum HL_FLAGS do_profiling() flags schar_T sattr_T indent.h: set_indent() flags macros.h: BINARY_FILE_IO flags mbyte.h: MB_BYTE2LEN* ENC_* memfile.h: mf_sync() flags misc1.h: open_line() flags message.h: do_dialog() flags vim_dialogyesno() flags DLG_BUTTON_* normal.h: find_ident_under_cursor() flags ops.h: do_put() flags operator ID's option.h: buf_copy_options() flags OPT_* flags os_unix.h: mch_nodetype() flags quickfix.h: skip_vimgrep_pat() flags regexp.h: vim_regcomp() flags values for reg_do_extmatch search.h: do_search() flags search_regcomp() flags findmatchlimit() flags syntax.h: HL_* flags HL_FOLD is used in buffer_defs.h but nvim compiles just fine with the defines in syntax.h tag.h: do_tag() flags find_tags() flags term.h: TBUFSZ flags MOUSE flags ui.h: jump_to_mouse() flags window.h: file_name_in_line() flags win_split() flags MIN_LINES MIN_COLUMNS Remove VimClipboard which should have been removed with PR #921.
2014-07-11Include stdbool.h in some files which use itPavel Platto1
Done by manual inspection of the output of this script: grep -r -l -w "bool\|true\|false" * | grep 'c$\|h$' > has_bool grep -r -l "stdbool.h" * | grep 'c$\|h$' > has_include grep -F -x -v -f has_include has_bool
2014-06-02Fix some stylesZyX1
2014-06-02Add automatic generation of headersZyX1
- The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception.
2014-05-15Introduce nvim namespace: Fix define guards.Eliseo Martínez1
Change define guards from NEOVIM_XXX_H to NVIM_XXX_H: - Change header files. - Change clint correct guard name calculation.
2014-05-15Introduce nvim namespace: Move files.Eliseo Martínez1
Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.