diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-04-04 02:37:43 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-04-04 14:19:26 +0200 |
commit | e348e256f3ed93fe462971447ee79033307b2ddf (patch) | |
tree | b8c255d5249d493fce85b33506988ed8649b7780 /src/nvim/option.c | |
parent | 3ccd59ee8216f3da812c5cf81eb392e6a95b539a (diff) | |
download | rneovim-e348e256f3ed93fe462971447ee79033307b2ddf.tar.gz rneovim-e348e256f3ed93fe462971447ee79033307b2ddf.tar.bz2 rneovim-e348e256f3ed93fe462971447ee79033307b2ddf.zip |
'guicursor': Disable by default for unknown terminals.
User can still set guicursor explicitly in init.vim.
Closes #5990
Closes #6403
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 695d0edebf..458d80716c 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -939,11 +939,8 @@ void free_all_options(void) #endif -/* - * Initialize the options, part two: After getting Rows and Columns and - * setting 'term'. - */ -void set_init_2(void) +/// Initialize the options, part two: After getting Rows and Columns. +void set_init_2(bool headless) { int idx; @@ -966,8 +963,12 @@ void set_init_2(void) 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 */ + if (!headless && !os_term_is_nice()) { + set_string_option_direct((char_u *)"guicursor", -1, (char_u *)"", + OPT_GLOBAL, SID_NONE); + } + parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor' + (void)parse_printoptions(); // parse 'printoptions' default value } /* @@ -2842,9 +2843,10 @@ did_set_string_option ( } } - /* 'guicursor' */ - else if (varp == &p_guicursor) + // 'guicursor' + else if (varp == &p_guicursor) { errmsg = parse_shape_opt(SHAPE_CURSOR); + } else if (varp == &p_popt) errmsg = parse_printoptions(); |