aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
Commit message (Collapse)AuthorAge
* lintJustin M. Keyes2019-09-13
|
* getdigits: introduce `strict`, `def` parametersJustin M. Keyes2019-09-13
| | | | | | | | | | | | Problem: During a refactor long ago, we changed the `getdigits_*` familiy of functions to abort on overflow. But this is often wrong, because many of these codepaths are handling user input. Solution: Decide at each call-site whether to use "strict" mode. fix #5555
* docJustin M. Keyes2019-09-11
| | | | | fix #10127 fix #5972
* anchor float to buffer positionBjörn Linse2019-09-04
| | | | vim-patch:8.1.1645: cannot use a popup window for a balloon
* vim-patch:8.1.0046: loading a session file fails if 'winheight' is bigJan Edmund Lazo2019-09-02
| | | | | | | | | Problem: Loading a session file fails if 'winheight' is a big number. Solution: Set 'minwinheight' to zero at first. Don't give an error when setting 'minwinheight' while 'winheight' is a big number. Fix using vertical splits. Fix setting 'minwinwidth'. (closes vim/vim#2970) https://github.com/vim/vim/commit/1c3c10492a291270fa89b3c8df11828792f927d3
* screen: use dedicated message gridBjörn Linse2019-09-01
| | | | | | | | add proper msg_set_pos event, delet win_scroll_over_* make compositor click through unfocusable grids add MsgArea attribute for the message/cmdline area, and add docs and tests
* teardown: fix win_free_all() heap-use-after-free #10839Abdelhakeem Osama2019-08-25
| | | Fixes #10838
* api: nvim_win_open() style="minimal" should disable 'foldcolumn'Björn Linse2019-08-14
|
* build: fix gcc warnings #10568ddcien2019-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc version 8.3.0 (Debian 8.3.0-6) ../src/nvim/ex_docmd.c: In function ‘commands_array’: ../src/nvim/ex_docmd.c:10192:36: warning: ‘%ld’ directive output may be truncated writing between 1 and 19 bytes into a region of size 10 [-Wformat-truncation=] snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ^~~ ../src/nvim/ex_docmd.c:10192:37: note: format string is defined here snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ../src/nvim/ex_docmd.c:10192:36: note: directive argument in the range [0, 9223372036854775807] snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ^~~ ../src/nvim/ex_docmd.c:10192:9: note: ‘snprintf’ output between 2 and 20 bytes into a destination of size 10 snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/nvim/ex_docmd.c:10205:36: warning: ‘%ld’ directive output may be truncated writing between 1 and 19 bytes into a region of size 10 [-Wformat-truncation=] snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ^~~ ../src/nvim/ex_docmd.c:10205:37: note: format string is defined here snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ../src/nvim/ex_docmd.c:10205:36: note: directive argument in the range [0, 9223372036854775807] snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ^~~ ../src/nvim/ex_docmd.c:10205:9: note: ‘snprintf’ output between 2 and 20 bytes into a destination of size 10 snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/nvim/spell.c: In function ‘did_set_spelllang’: ../src/nvim/spell.c:1631:61: warning: ‘%s’ directive output may be truncated writing up to 254 bytes into a region of size 84 [-Wformat-truncation=] "autocmd VimEnter * call spellfile#LoadFile('%s')|set spell", ^~ ../src/nvim/spell.c:2063:25: spell_load_lang(lang); ~~~~ ../src/nvim/spell.c:1630:7: note: ‘snprintf’ output between 57 and 311 bytes into a destination of size 128 snprintf(autocmd_buf, sizeof(autocmd_buf), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "autocmd VimEnter * call spellfile#LoadFile('%s')|set spell", ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lang); ~~~~~ ../src/nvim/window.c: In function ‘win_rotate’: ../src/nvim/window.c:1780:22: warning: ‘wp2’ may be used uninitialized in this function [-Wmaybe-uninitialized] wp2->w_pos_changed = true; ^ ../src/nvim/window.c:1779:22: warning: ‘wp1’ may be used uninitialized in this function [-Wmaybe-uninitialized] wp1->w_pos_changed = true;
* refactor: use int for Columns and RowsBjörn Linse2019-07-19
|
* vim-patch:8.1.0623: iterating through window frames is repeatedJan Edmund Lazo2019-07-15
| | | | | | Problem: Iterating through window frames is repeated. Solution: Define FOR_ALL_FRAMES. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/3d1491ed2394b3e92902102879bace28a5f9c201
* window: allow resize wincmds for floatsBjörn Linse2019-07-08
|
* api/window: add style="minimal" flag to nvim_open_win()Björn Linse2019-07-07
|
* vim-patch:8.0.1688: some macros are used without a semicolonJan Edmund Lazo2019-06-26
| | | | | | | Problem: Some macros are used without a semicolon, causing auto-indent to be wrong. Solution: Use the do-while(0) trick. (Ozaki Kiichi, closes vim/vim#2729) https://github.com/vim/vim/commit/6f4700233fd925fe122b851f937929fb5e5da707
* vim-patch:8.1.0213: CTRL-W CR does not work properly in a quickfix windowJan Edmund Lazo2019-06-12
| | | | | | Problem: CTRL-W CR does not work properly in a quickfix window. Solution: Split the window if needed. (Jason Franklin) https://github.com/vim/vim/commit/0a08c63da17dfd93ac2885e3f3f8a083a9b3131c
* vim-patch:8.1.0307: there is no good way to get the window layoutJan Edmund Lazo2019-05-26
| | | | | | Problem: There is no good way to get the window layout. Solution: Add the winlayout() function. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/0f6b4f06dece71487a6d8546c50de775d9c8c287
* lintJustin M. Keyes2019-05-25
|
* vim-patch:8.0.1496: VIM_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629) vim-patch:8.0.1481
* autocmd: fixes and tests for autocmd window issuesBjörn Linse2019-05-13
| | | | | | - redraw! in an invisible buffer rendered the screen unusable. - storing the autocmd window handle and using it in API function could lead to crashes. Unregister the handle when the window is not active.
* vim-patch:8.1.1205: BufReadPre may move the cursor #9980Justin M. Keyes2019-05-08
| | | | | | | Problem: A BufReadPre autocommand may cause the cursor to move. Solution: Restore the cursor position after executing the autocommand, unless the autocommand moved it. (Christian Brabandt, closes vim/vim#4302, closes vim/vim#4294) https://github.com/vim/vim/commit/a68e59590905da9b4448ff1fcac929ad1a18da9e
* Merge #9798 'aucmd_prepbuf: Use floating window'Justin M. Keyes2019-05-06
|\
| * aucmd_win: use a floating windowMarco Hinz2019-05-06
|/
* vim-patch:8.1.1242: no cmdline redraw when tabpages have different 'cmdheight'Jan Edmund Lazo2019-05-02
| | | | | | | Problem: No cmdline redraw when tabpages have different 'cmdheight'. Solution: redraw the command line when 'cmdheight' changes when switching tabpages. (closes vim/vim#4321) https://github.com/vim/vim/commit/0fef0aeb1ca6c85df0a656a70b6ca49c34563c89
* vim-patch:8.1.1207: some compilers give warning messagesJan Edmund Lazo2019-04-27
| | | | | | | Problem: Some compilers give warning messages. Solution: Initialize variables, change printf() argument. (Christian Brabandt, closes vim/vim#4305) https://github.com/vim/vim/commit/1f3601e92e7fd2813b9541580d6d9649c802eb58
* windows: float config changesBjörn Linse2019-04-14
| | | | | | | | | | - Allow floating windows of width 1. #9846 - For a new floating window the size must be specified. Later on we might try to calculate a reasonable size by buffer contents - Remember the configured size of a window, just like its position. - Make get_config and set_config more consistent. Handle relative='' properly in set_config. get_config doesn't return keys that don't make sense for a non-floating window. - Don't use width=0 for non-changed width, just omit the key.
* float: always change to valid windows (#9878)Marco Hinz2019-04-11
| | | | | | | | Using `:wincmd j` and friends doesn't make much sense to a floating window. For convenience though, any direction will simply change to the previous window. Make sure the previous window is valid, not the current window, and not another floating window. Change to the first window (which is never a floating window) otherwise.
* vim-patch:8.1.1140: not easy to find out what neighbors a window has (#9873)Marco Hinz2019-04-10
| | | | | | Problem: Not easy to find out what neighbors a window has. Solution: Add more arguments to winnr(). (Yegappan Lakshmanan) https://github.com/vim/vim/commit/46ad288b9b2a6eb0430cf802ff5ce68a58629897
* clang/"result is garbage/undefined": win_closeJustin M. Keyes2019-04-01
| | | | win_free_mem: set `dirp` to a dummy value.
* Merge #9807 from mhinz/window-local-last-cursormovedMarco Hinz2019-03-31
|\
| * cursormoved: always trigger CursorMoved when entering windowMarco Hinz2019-03-29
| |
* | vim-patch:8.1.1088: height of quickfix window not retained with vertical ↵Justin M. Keyes2019-03-30
|/ | | | | | | | | | split (#9818) Problem: Height of quickfix window not retained with vertical split. Solution: Use frame_fixed_height() and frame_fixed_width(). (Hongbo Liu, closes vim/vim#4013, closes vim/vim#2998) https://github.com/vim/vim/commit/9e1e358d376284c3aaf3a9f1e568bca297405f62 closes #3608
* Update to restore layout only for non-floating windowsJit Yao Yap2019-03-23
|
* floating-window.c: fix crash when using inccommandJit Yao Yap2019-03-23
|
* window: don't crash when closing two floats in a rowBjörn Linse2019-03-23
| | | | | prevwin can be set to the current window. Then we can't jump to it after closing a float.
* help: ignore snapshotted window if invalid (#9774)Marco Hinz2019-03-23
| | | | | | | | | | | | | | | | | | Nvim doesn't expect a window-changing command on an created-window event. autocmd WinNew * wincmd p help help - A snapshot for window 1000 is created. - The window is split and the cursor changes to the new window 1001. - The autocmd kicks in and switches back to 1000. - The help buffer is opened. - On closing the help window 1000, it tries to go back to the snapshotted window which is... 1000. - wp1000->w_buffer == NULL - w_buffer is used by check_cursor() - 🧨 -> 💥 Fixes https://github.com/neovim/neovim/issues/9773
* api: ignore floating windows for laststatus=1 (#9771)Marco Hinz2019-03-22
| | | | | ONE_WINDOW considers all windows whereas one_window() ignores floating windows. Fixes https://github.com/neovim/neovim/issues/9768
* api: refactor FloatRelative usageMarco Hinz2019-03-16
|
* api: numerous small fixesMarco Hinz2019-03-16
|
* api: add width/height to FloatConfigMarco Hinz2019-03-16
|
* api: refactor FloatAnchor usageMarco Hinz2019-03-16
|
* floats: add NormalFloat highlight and 'nonumber' defaultBjörn Linse2019-03-12
|
* window: simplify logic for entering new floatBjörn Linse2019-03-12
|
* vim-patch:8.1.1002: "gf" on URL with port number #9705Jan Edmund Lazo2019-03-10
| | | | | | Problem: "gf" does not always work when URL has a port number. (Jakob Schöttl) Solution: When a URL is recognized also accept ":". (closes vim/vim#4082) https://github.com/vim/vim/commit/cbef8e1aa1f260ffde16491b1678eae53a36cf68
* vim-patch:8.1.0994: fix relative cursor position #9676Justin M. Keyes2019-03-09
| | | | | | Problem: Relative cursor position is not calculated correctly. Solution: Always set topline, also when window is one line only. (Robert Webb) Add more info to getwininfo() for testing. https://github.com/vim/vim/commit/8fcb60f961bdd134599fb016c6537fd496e800f5
* floating-window: fix crash setting cmdheight #9685erw72019-03-09
| | | fixes #9680
* PVS/V560: window.c: fix always true condition #9682Billy SU2019-03-05
|
* floats: implement floating windowsBjörn Linse2019-03-02
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* vim-patch:8.1.0932: remove Farsi support (#9622)Justin M. Keyes2019-02-17
| | | | | Problem: Farsi support is outdated and unused. Solution: Delete the Farsi support. https://github.com/vim/vim/commit/14184a3133b9a6ee5f711d493c04e41ba4fa7c2f
* clang/"null pointer dereference": win_rotateJustin M. Keyes2019-02-14
|
* rename ui_is_external to ui_has (#9576)Justin M. Keyes2019-02-03
|