diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-04-04 15:26:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 15:26:32 +0200 |
commit | 4566f7c7cda2c3a181ec58998f7c93dd17500153 (patch) | |
tree | 049ef60e8dd071342b5c075592c035715d676fef /src/nvim/option.c | |
parent | 9d560d5c6b02d34690ca47ee6f32e31ee4a6d90e (diff) | |
parent | a7f34e199144bfb657c180cdc1413093fd34bdf9 (diff) | |
download | rneovim-4566f7c7cda2c3a181ec58998f7c93dd17500153.tar.gz rneovim-4566f7c7cda2c3a181ec58998f7c93dd17500153.tar.bz2 rneovim-4566f7c7cda2c3a181ec58998f7c93dd17500153.zip |
Merge #6432 from justinmk/guicursor
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(); |