mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
vim-patch:9.1.1819: Cannot configure the inner foldlevel indicator (#36010)
Problem: Cannot configure the inner foldlevel indicator for the
foldcolumn
Solution: Add "foldinner" suboption value to the 'fillchar' option
(Maria José Solano).
closes: vim/vim#18365
1a691afd27
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
This commit is contained in:
@@ -1077,6 +1077,7 @@ typedef struct {
|
||||
schar_T foldopen; ///< when fold is open
|
||||
schar_T foldclosed; ///< when fold is closed
|
||||
schar_T foldsep; ///< continuous fold marker
|
||||
schar_T foldinner;
|
||||
schar_T diff;
|
||||
schar_T msgsep;
|
||||
schar_T eob;
|
||||
|
@@ -517,6 +517,8 @@ void fill_foldcolumn(win_T *wp, foldinfo_T foldinfo, linenr_T lnum, int attr, in
|
||||
symbol = wp->w_p_fcs_chars.foldopen;
|
||||
} else if (first_level == 1) {
|
||||
symbol = wp->w_p_fcs_chars.foldsep;
|
||||
} else if (wp->w_p_fcs_chars.foldinner != NUL) {
|
||||
symbol = wp->w_p_fcs_chars.foldinner;
|
||||
} else if (first_level + i <= 9) {
|
||||
symbol = schar_from_ascii('0' + first_level + i);
|
||||
} else {
|
||||
|
@@ -3261,7 +3261,10 @@ local options = {
|
||||
fold '·' or '-' filling 'foldtext'
|
||||
foldopen '-' mark the beginning of a fold
|
||||
foldclose '+' show a closed fold
|
||||
foldsep '│' or '|' open fold middle marker
|
||||
foldsep '│' or '|' open fold middle marker
|
||||
foldinner none character to show instead of the
|
||||
numeric foldlevel when it would be
|
||||
repeated in a narrow 'foldcolumn'
|
||||
diff '-' deleted lines of the 'diff' option
|
||||
msgsep ' ' message separator 'display'
|
||||
eob '~' empty lines at the end of a buffer
|
||||
|
@@ -2246,26 +2246,27 @@ struct chars_tab {
|
||||
|
||||
static fcs_chars_T fcs_chars;
|
||||
static const struct chars_tab fcs_tab[] = {
|
||||
CHARSTAB_ENTRY(&fcs_chars.stl, "stl", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.stlnc, "stlnc", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.wbr, "wbr", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.horiz, "horiz", "─", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.horizup, "horizup", "┴", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.horizdown, "horizdown", "┬", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.vert, "vert", "│", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.vertleft, "vertleft", "┤", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.vertright, "vertright", "├", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.verthoriz, "verthoriz", "┼", "+"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.fold, "fold", "·", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.foldopen, "foldopen", "-", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.foldclosed, "foldclose", "+", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.foldsep, "foldsep", "│", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.diff, "diff", "-", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.msgsep, "msgsep", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.eob, "eob", "~", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.lastline, "lastline", "@", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.trunc, "trunc", ">", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.truncrl, "truncrl", "<", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.stl, "stl", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.stlnc, "stlnc", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.wbr, "wbr", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.horiz, "horiz", "─", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.horizup, "horizup", "┴", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.horizdown, "horizdown", "┬", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.vert, "vert", "│", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.vertleft, "vertleft", "┤", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.vertright, "vertright", "├", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.verthoriz, "verthoriz", "┼", "+"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.fold, "fold", "·", "-"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.foldopen, "foldopen", "-", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.foldclosed, "foldclose", "+", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.foldsep, "foldsep", "│", "|"),
|
||||
CHARSTAB_ENTRY(&fcs_chars.foldinner, "foldinner", NULL, NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.diff, "diff", "-", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.msgsep, "msgsep", " ", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.eob, "eob", "~", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.lastline, "lastline", "@", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.trunc, "trunc", ">", NULL),
|
||||
CHARSTAB_ENTRY(&fcs_chars.truncrl, "truncrl", "<", NULL),
|
||||
};
|
||||
|
||||
static lcs_chars_T lcs_chars;
|
||||
|
Reference in New Issue
Block a user