From 05ea3c1997a5f8c1c28192cb67a1306485c11b9a Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 12 Jan 2020 01:36:11 +0100 Subject: [PATCH] defaults: set fillchars "foldsep" to box line #11702 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "│" U+2502 BOX DRAWINGS LIGHT VERTICAL Fallback to old default | if 'ambiwidth' is set. --- runtime/doc/options.txt | 4 ++-- runtime/doc/vim_diff.txt | 2 +- src/nvim/option.c | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e32a52cdbbcc82..70af23ee29f455 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -2373,7 +2373,7 @@ A jump table for the options with a short description can be found at |Q_op|. fold:c '·' or '-' filling 'foldtext' foldopen:c '-' mark the beginning of a fold foldclose:c '+' show a closed fold - foldsep:c '|' open fold middle marker + foldsep:c '│' or '|' open fold middle marker diff:c '-' deleted lines of the 'diff' option msgsep:c ' ' message separator 'display' eob:c '~' empty lines at the end of a buffer @@ -2382,7 +2382,7 @@ A jump table for the options with a short description can be found at |Q_op|. "stlnc" the space will be used when there is highlighting, '^' or '=' otherwise. - If 'ambiwidth' is "double" then "vert" and "fold" default to + If 'ambiwidth' is "double" then "vert", "foldsep" and "fold" default to single-byte alternatives. Example: > diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index e19659a4c4805f..c9887561545ff9 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -38,7 +38,7 @@ the differences. - 'directory' defaults to ~/.local/share/nvim/swap// (|xdg|), auto-created - 'display' defaults to "lastline,msgsep" - 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding) -- 'fillchars' defaults (in effect) to "vert:│,fold:·" +- 'fillchars' defaults (in effect) to "vert:│,fold:·,sep:│" - 'formatoptions' defaults to "tcqj" - 'fsync' is disabled - 'history' defaults to 10000 (the maximum) diff --git a/src/nvim/option.c b/src/nvim/option.c index a8a4ad6484fda6..9d3e02949e14d9 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3544,7 +3544,7 @@ static char_u *set_chars_option(win_T *wp, char_u **varp, bool set) { &wp->w_p_fcs_chars.fold, "fold", 183 }, // · { &wp->w_p_fcs_chars.foldopen, "foldopen", '-' }, { &wp->w_p_fcs_chars.foldclosed, "foldclose", '+' }, - { &wp->w_p_fcs_chars.foldsep, "foldsep", '|' }, + { &wp->w_p_fcs_chars.foldsep, "foldsep", 9474 }, // │ { &wp->w_p_fcs_chars.diff, "diff", '-' }, { &wp->w_p_fcs_chars.msgsep, "msgsep", ' ' }, { &wp->w_p_fcs_chars.eob, "eob", '~' }, @@ -3576,9 +3576,11 @@ static char_u *set_chars_option(win_T *wp, char_u **varp, bool set) // XXX: If ambiwidth=double then "|" and "·" take 2 columns, which is // forbidden (TUI limitation?). Set old defaults. fcs_tab[2].def = '|'; + fcs_tab[6].def = '|'; fcs_tab[3].def = '-'; } else { fcs_tab[2].def = 9474; // │ + fcs_tab[6].def = 9474; // │ fcs_tab[3].def = 183; // · } }