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 622a36b1f1
This commit is contained in:
Justin M. Keyes
2021-09-02 10:29:59 -07:00
committed by GitHub
parent 622a36b1f1
commit 5f8518b3f0
4 changed files with 14 additions and 25 deletions

View File

@@ -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");
}