Skip to content

Commit

Permalink
defaults: set fillchars "foldsep" to box line #11702
Browse files Browse the repository at this point in the history
"│" U+2502 BOX DRAWINGS LIGHT VERTICAL

Fallback to old default | if 'ambiwidth' is set.
  • Loading branch information
teto authored and justinmk committed Jan 12, 2020
1 parent 1cbe8d6 commit 05ea3c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions runtime/doc/options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: >
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/vim_diff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion src/nvim/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -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", '~' },
Expand Down Expand Up @@ -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; // ·
}
}
Expand Down

0 comments on commit 05ea3c1

Please sign in to comment.