aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-13 22:10:05 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-13 22:19:00 +0200
commitcbfd18c85acdce397f948edd764ac738ab9281ad (patch)
tree9c004666644a989df0e288ed9de2f8dd5147ce1d
parent947bd293c98eda680c0e89b2d453b91eeda54272 (diff)
downloadrneovim-cbfd18c85acdce397f948edd764ac738ab9281ad.tar.gz
rneovim-cbfd18c85acdce397f948edd764ac738ab9281ad.tar.bz2
rneovim-cbfd18c85acdce397f948edd764ac738ab9281ad.zip
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
-rw-r--r--src/nvim/option.c3
1 files changed, 2 insertions, 1 deletions
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.