Clear 'cc' in nvim_open_win 'minimal' style #11361 (#11427)

* Clear 'cc' in nvim_open_win 'minimal' style #11361

Add 'colorcolumn' to the list of options that should be cleared when creating
a 'minimal'-style floating window.
This commit is contained in:
Dennis B
2019-11-22 20:55:04 +11:00
committed by Björn Linse
parent cc5487e32f
commit d5f14b8372
4 changed files with 35 additions and 25 deletions

View File

@@ -1074,9 +1074,10 @@ fail:
/// float where the text should not be edited. Disables
/// 'number', 'relativenumber', 'cursorline', 'cursorcolumn',
/// 'foldcolumn', 'spell' and 'list' options. 'signcolumn'
/// is changed to `auto`. The end-of-buffer region is hidden
/// by setting `eob` flag of 'fillchars' to a space char,
/// and clearing the |EndOfBuffer| region in 'winhighlight'.
/// is changed to `auto` and 'colorcolumn' is cleared. The
/// end-of-buffer region is hidden by setting `eob` flag of
/// 'fillchars' to a space char, and clearing the
/// |EndOfBuffer| region in 'winhighlight'.
/// @param[out] err Error details, if any
///
/// @return Window handle, or 0 on error

View File

@@ -633,6 +633,12 @@ void win_set_minimal_style(win_T *wp)
xfree(wp->w_p_scl);
wp->w_p_scl = (char_u *)xstrdup("auto");
}
// colorcolumn: cleared
if (wp->w_p_cc != NULL && *wp->w_p_cc != NUL) {
xfree(wp->w_p_cc);
wp->w_p_cc = (char_u *)xstrdup("");
}
}
void win_config_float(win_T *wp, FloatConfig fconfig)