diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2020-05-04 21:04:47 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2020-05-04 21:21:33 -0700 |
commit | 7b764bb43d9c45e04a8dbb0146b3529991007949 (patch) | |
tree | ff8df84a5d8f7909b8f6308c4f4280b82fb22ac5 /src | |
parent | edd5b233d8d97a21b2cc572f7fe49331e395a55b (diff) | |
download | rneovim-7b764bb43d9c45e04a8dbb0146b3529991007949.tar.gz rneovim-7b764bb43d9c45e04a8dbb0146b3529991007949.tar.bz2 rneovim-7b764bb43d9c45e04a8dbb0146b3529991007949.zip |
terminal: disable 'scrolloff' (fixes flicker)
Besides the special-case in get_scrolloff_value(), it makes sense for
'scrolloff' and 'sidescrolloff' to reflect the correct values (for
plugins, scripts, …).
ref 53d607af9c53accfd634435908fb79061f1212b9
ref #11915
ref #12230
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/terminal.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 560a345333..a096b77ac6 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -343,12 +343,16 @@ void terminal_enter(void) RedrawingDisabled = false; // Disable these options in terminal-mode. They are nonsense because cursor is - // placed at end of buffer to "follow" output. + // placed at end of buffer to "follow" output. #11072 win_T *save_curwin = curwin; int save_w_p_cul = curwin->w_p_cul; int save_w_p_cuc = curwin->w_p_cuc; + long save_w_p_so = curwin->w_p_so; + long save_w_p_siso = curwin->w_p_siso; curwin->w_p_cul = false; curwin->w_p_cuc = false; + curwin->w_p_so = 0; + curwin->w_p_siso = 0; adjust_topline(s->term, buf, 0); // scroll to end // erase the unfocused cursor @@ -370,6 +374,8 @@ void terminal_enter(void) if (save_curwin == curwin) { // save_curwin may be invalid (window closed)! curwin->w_p_cul = save_w_p_cul; curwin->w_p_cuc = save_w_p_cuc; + curwin->w_p_so = save_w_p_so; + curwin->w_p_siso = save_w_p_siso; } // draw the unfocused cursor |