aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/aucmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-02 10:29:59 -0700
committerGitHub <noreply@github.com>2021-09-02 10:29:59 -0700
commit5f8518b3f04c2295be24912dba78d3e34ca74b91 (patch)
tree1c51cd68d33d562d0a7115a8c7bdf7e440332172 /src/nvim/aucmd.c
parent622a36b1f1c652a8de433028bc4a03a1216db23f (diff)
downloadrneovim-5f8518b3f04c2295be24912dba78d3e34ca74b91.tar.gz
rneovim-5f8518b3f04c2295be24912dba78d3e34ca74b91.tar.bz2
rneovim-5f8518b3f04c2295be24912dba78d3e34ca74b91.zip
fix(defaults): "syntax sync maxlines=1" on CmdwinEnter #15552
I mistakenly suggested maxlines=&cmdwinheight, forgetting that it is calculated from topline, not cursor. maxlines=1 makes the most sense in cmdwin. ref #15401 622a36b1f1c652a8de433028bc4a03a1216db23f
Diffstat (limited to 'src/nvim/aucmd.c')
-rw-r--r--src/nvim/aucmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/aucmd.c b/src/nvim/aucmd.c
index 8544a3d2e0..802fc9de57 100644
--- a/src/nvim/aucmd.c
+++ b/src/nvim/aucmd.c
@@ -41,7 +41,6 @@ void init_default_autocmds(void)
// open terminals when opening files that start with term://
#define PROTO "term://"
do_cmdline_cmd("augroup nvim_terminal");
- do_cmdline_cmd("autocmd!");
do_cmdline_cmd("autocmd BufReadCmd " PROTO "* ++nested "
"if !exists('b:term_title')|call termopen("
// Capture the command string
@@ -56,7 +55,7 @@ void init_default_autocmds(void)
// limit syntax synchronization in the command window
do_cmdline_cmd("augroup nvim_cmdwin");
- do_cmdline_cmd("autocmd! CmdWinEnter [:>] exe 'syntax sync minlines=1 maxlines='..&cmdwinheight");
+ do_cmdline_cmd("autocmd! CmdwinEnter [:>] syntax sync minlines=1 maxlines=1");
do_cmdline_cmd("augroup END");
}