diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-29 21:15:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 21:15:36 -0500 |
commit | c762f5220b02036e4eb9097a1d2a9fded6375fa0 (patch) | |
tree | c67edf4adb035ccbffb8442a98117a66cdab49e1 | |
parent | 28a0f6b17ddb51f605abfcd9d48b8084545d5901 (diff) | |
download | rneovim-c762f5220b02036e4eb9097a1d2a9fded6375fa0.tar.gz rneovim-c762f5220b02036e4eb9097a1d2a9fded6375fa0.tar.bz2 rneovim-c762f5220b02036e4eb9097a1d2a9fded6375fa0.zip |
vim-patch:8.2.2244: crash when making the window width negative (#13633)
Problem: Crash when making the window width of the not-current window
negative.
Solution: Make sure the window width is not negative. (closes vim/vim#7568)
https://github.com/vim/vim/commit/89015a675990bd7d70e041c5d890edb803b5c6b7
N/A patches for version.c:
vim-patch:8.0.1617: Win32: :shell command in the GUI crashes
Problem: Win32: :shell command in the GUI crashes.
Solution: Handle the situation that "cmd" is NULL. (Yasuhiro Matsumoto,
closes vim/vim#2721)
https://github.com/vim/vim/commit/42f652f733550a0d8bc9b030c9a5a62e7e2d8668
vim-patch:8.1.0244: no redraw when using a STOP signal on Vim and then CONT
Problem: No redraw when using a STOP signal on Vim and then a CONT signal.
Solution: Catch the CONT signal and force a redraw. (closes vim/vim#3285)
https://github.com/vim/vim/commit/917e32bda5a93941fbbccab09ae3960114b67188
vim-patch:8.1.0302: crash when using :suspend and "fg"
Problem: Crash when using :suspend and "fg".
Solution: Undo patch 8.1.244.
https://github.com/vim/vim/commit/f1883479be91550bc31dd88f593b3012863a2629
vim-patch:8.1.0548: crash when job callback unloads a buffer
Problem: Crash when job callback unloads a buffer. (James McCoy)
Solution: Don't round up the wait time to 10 msec in ui_inchar().
https://github.com/vim/vim/commit/1341024e0823d9aa9cde08d6b55e12f2d90ff778
vim-patch:8.1.1652: GUI: popup window doesn't close on mouse movement
Problem: GUI: popup window doesn't close on mouse movement. (Paul Jolly)
Solution: Generate mouse-move events when a popup window is visible.
https://github.com/vim/vim/commit/49fe95f22517b775506ef34681000d84bb417eb3
vim-patch:8.1.1695: Windows 10: crash when cursor is at bottom of terminal
Problem: Windows 10: crash when cursor is at bottom of terminal.
Solution: Position the cursor before resizing. (Yasuhiro Matsumoto,
closes vim/vim#4679)
https://github.com/vim/vim/commit/f49a6922596ea88856da802fe33df953b7d77ecb
vim-patch:8.2.2246: cursor keys not recognized at the hit-Enter prompt
Problem: Cursor keys not recognized at the hit-Enter prompt after executing
an external command.
Solution: Change the codes for the extra cursor keys. (closes vim/vim#7562)
Tune the delays to avoid test flakyness.
https://github.com/vim/vim/commit/4d8c96d4668ac965d4e84b9676fba6d7efe62a32
-rw-r--r-- | src/nvim/testdir/test_window_cmd.vim | 8 | ||||
-rw-r--r-- | src/nvim/window.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim index c630e678fd..bed39d0741 100644 --- a/src/nvim/testdir/test_window_cmd.vim +++ b/src/nvim/testdir/test_window_cmd.vim @@ -850,6 +850,14 @@ func Test_window_resize() exe other_winnr .. 'resize +1' call assert_equal(12, winheight(other_winnr)) call assert_equal(&lines - 10 - 3 -2, winheight(0)) + close + + vsplit + wincmd l + let other_winnr = winnr('h') + call assert_notequal(winnr(), other_winnr) + exe 'vert ' .. other_winnr .. 'resize -100' + call assert_equal(0, winwidth(other_winnr)) %bwipe! endfunc diff --git a/src/nvim/window.c b/src/nvim/window.c index 2dcce2d8cb..00f49724b6 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -5349,6 +5349,8 @@ void win_setwidth_win(int width, win_T *wp) width = p_wmw; if (width == 0) width = 1; + } else if (width < 0) { + width = 0; } if (wp->w_floating) { wp->w_float_config.width = width; |