From cbfd18c85acdce397f948edd764ac738ab9281ad Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 13 Aug 2019 22:10:05 +0200 Subject: [PATCH] startup: handle 'guicursor' after user config If parse_shape_opt() is done before user config, the TUI may cause unwanted changes to the terminal cursor which cannot later be undone (see #4396). fix #10750 --- src/nvim/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nvim/option.c b/src/nvim/option.c index 55b69edba0..953479fdd0 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1001,7 +1001,6 @@ void set_init_2(bool headless) p_window = Rows - 1; } set_number_default("window", Rows - 1); - parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor' (void)parse_printoptions(); // parse 'printoptions' default value } @@ -1010,6 +1009,8 @@ void set_init_2(bool headless) */ void set_init_3(void) { + parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor' + // Set 'shellpipe' and 'shellredir', depending on the 'shell' option. // This is done after other initializations, where 'shell' might have been // set, but only if they have not been set before.