aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommy Allen <tommy@esdf.io>2017-02-26 04:21:44 -0500
committerJustin M. Keyes <justinkz@gmail.com>2017-02-26 10:21:44 +0100
commit7ea81fe443369382b3ec8c9cfb5a80bcbcbe40bd (patch)
treec51004076062357f275e0ae53ef77c2cb79d35d7
parent0ef2b07d69c3f4da38219d8eef045232d18e9c37 (diff)
downloadrneovim-7ea81fe443369382b3ec8c9cfb5a80bcbcbe40bd.tar.gz
rneovim-7ea81fe443369382b3ec8c9cfb5a80bcbcbe40bd.tar.bz2
rneovim-7ea81fe443369382b3ec8c9cfb5a80bcbcbe40bd.zip
terminal: Don't redraw the entire screen when resizing (#6167)
-rw-r--r--src/nvim/window.c3
-rw-r--r--test/functional/terminal/mouse_spec.lua2
-rw-r--r--test/functional/terminal/window_split_tab_spec.lua2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 28269e8889..73a60b2e04 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -4848,7 +4848,7 @@ void scroll_to_fraction(win_T *wp, int prev_height)
if (wp->w_buffer->terminal) {
terminal_resize(wp->w_buffer->terminal, 0, wp->w_height);
- redraw_win_later(wp, CLEAR);
+ redraw_win_later(wp, NOT_VALID);
}
}
@@ -4872,7 +4872,6 @@ void win_new_width(win_T *wp, int width)
if (wp->w_height != 0) {
terminal_resize(wp->w_buffer->terminal, wp->w_width, 0);
}
- redraw_win_later(wp, CLEAR);
}
}
diff --git a/test/functional/terminal/mouse_spec.lua b/test/functional/terminal/mouse_spec.lua
index ecb0b2beb0..da7e1c36db 100644
--- a/test/functional/terminal/mouse_spec.lua
+++ b/test/functional/terminal/mouse_spec.lua
@@ -117,7 +117,7 @@ describe('terminal mouse', function()
rows: 5, cols: 25 |rows: 5, cols: 25 |
{2:^ } |{2: } |
========== ========== |
- |
+ :vsp |
]])
feed(':enew | set number<cr>')
screen:expect([[
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua
index 6951b84a69..ed8a63559a 100644
--- a/test/functional/terminal/window_split_tab_spec.lua
+++ b/test/functional/terminal/window_split_tab_spec.lua
@@ -37,7 +37,7 @@ describe('terminal', function()
{4:~ }|
{4:~ }|
========== |
- |
+ :2split |
]])
execute('wincmd p')
screen:expect([[