aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-05-05 00:32:23 -0400
committerGitHub <noreply@github.com>2020-05-05 00:32:23 -0400
commitfdd328d568f7f1a11474fd59a429ace2720afa33 (patch)
treeff8df84a5d8f7909b8f6308c4f4280b82fb22ac5 /src/nvim/option.c
parentf605eeec65a3f4923e02f97fcef713365cd2e588 (diff)
parent7b764bb43d9c45e04a8dbb0146b3529991007949 (diff)
downloadrneovim-fdd328d568f7f1a11474fd59a429ace2720afa33.tar.gz
rneovim-fdd328d568f7f1a11474fd59a429ace2720afa33.tar.bz2
rneovim-fdd328d568f7f1a11474fd59a429ace2720afa33.zip
Merge #12230 'fix :terminal flicker with scrolloff'
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c5
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;
}
-