diff options
author | LawAbidingCactus <lawabidingcactus@lawabidingcactus.com> | 2020-05-02 10:13:12 +0000 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2020-05-04 21:21:33 -0700 |
commit | edd5b233d8d97a21b2cc572f7fe49331e395a55b (patch) | |
tree | 0bf20523d93b372628eed933232267ecad806f1b /src | |
parent | f605eeec65a3f4923e02f97fcef713365cd2e588 (diff) | |
download | rneovim-edd5b233d8d97a21b2cc572f7fe49331e395a55b.tar.gz rneovim-edd5b233d8d97a21b2cc572f7fe49331e395a55b.tar.bz2 rneovim-edd5b233d8d97a21b2cc572f7fe49331e395a55b.zip |
terminal: always return zero from get_scrolloff_value() #12230
Fixes flicker
fix #11072
fix #11915
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/option.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index d7675f48d7..84ace55d91 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -7453,6 +7453,10 @@ dict_T *get_winbuf_options(const int bufopt) /// global value when appropriate. long get_scrolloff_value(void) { + // Disallow scrolloff in terminal-mode. #11915 + if (State & TERM_FOCUS) { + return 0; + } return curwin->w_p_so < 0 ? p_so : curwin->w_p_so; } @@ -7462,4 +7466,3 @@ long get_sidescrolloff_value(void) { return curwin->w_p_siso < 0 ? p_siso : curwin->w_p_siso; } - |