Skip to content

Commit

Permalink
startup: handle 'guicursor' after user config
Browse files Browse the repository at this point in the history
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
  • Loading branch information
justinmk committed Aug 13, 2019
1 parent 947bd29 commit cbfd18c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nvim/option.c
Expand Up @@ -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
}

Expand All @@ -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.
Expand Down

0 comments on commit cbfd18c

Please sign in to comment.