From 5f8518b3f04c2295be24912dba78d3e34ca74b91 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 2 Sep 2021 10:29:59 -0700 Subject: 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 --- src/nvim/aucmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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"); } -- cgit