On 04/18/2010 12:44 PM, Gregor Uhlenheuer wrote:
> On 04/11/2010 04:33 PM, Bram Moolenaar wrote:
>>
>> I will try to include a few patches that have been pending for a while.
>> I don't have much time available, thus I will only include things that
>> take a few hours of my time. That basically means patches that are
>> ready to be included.
>>
>
> Hi,
>
> a few months ago I posted an updated patch for the margincolumn
> feature that actually allows you to highlight a specified column (i.e.
> to show the current buffer's textwidth). Since then I kept updating it
> and use it without any problems.
>
Hi again,
since I am hoping that the 'margincolumn' feature will find its way
into the oncoming vim 7.3 release I tried to extend the feature by
allowing to define multiple columns to be highlighted.
As far as I could test the changes it works pretty well. A few notes
regarding the implementation: The 'margincolumn' setting is now a
string type setting used like this:
" highlight columns 20, 40 and textwidth+1
:set mc=-1,20,40
Internally the columns are stored inside a sorted fixed-size integer
array to reduce redrawing time. As far I can tell this way merely
increases redrawing time. Perhaps there is an even better solution out
there (sadly this win_line() function is a really ugly beast ;)) but
this is the best working solution I could come up with.
Perhaps you guys want to give it a try
The patch against the latest vim73 mercurial changeset is attached.
Cheers,
Gregor
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -r 9577a28005e1 -r 056c81ad44c9 runtime/doc/options.txt
--- a/runtime/doc/options.txt Mon Jul 12 21:38:19 2010 +0200
+++ b/runtime/doc/options.txt Mon Jul 12 22:47:35 2010 +0200
@@ -2163,7 +2163,7 @@
column. This option is useful for viewing the
differences between two versions of a file (see 'diff'); in diff mode,
inserted and deleted lines (though not characters within a line) are
- taken into account.
+ taken into account.
*'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'*
@@ -3283,6 +3283,7 @@
:highlight Cursor gui=reverse guifg=NONE guibg=NONE
:highlight Cursor gui=NONE guifg=bg guibg=fg
<
+
*'guifont'* *'gfn'*
*E235* *E596* *E610* *E611*
'guifont' 'gfn' string (default "")
@@ -4429,7 +4430,7 @@
The cursor is displayed at the start of the space a Tab character
occupies, not at the end as usual in Normal mode. To get this cursor
position while displaying Tabs with spaces, use: >
- :set list lcs=tab\ \
+ :set list lcs=tab\ \
<
Note that list mode will also affect formatting (set with 'textwidth'
or 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for
@@ -4547,6 +4548,24 @@
< This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
+ *'margincolumn'* *'mc'*
+'margincolumn' 'mc' string (default "")
+ global or local to buffer |global-local|
+ {not in Vi}
+ {not available when compiled without the |+syntax|
+ feature}
+ 'margincolumn' is a comma separated list of screen columns that are
+ highlighted with MarginColumn |hl-MarginColumn|. Useful to align
+ text. Will make screen redrawing slower.
+ If one of the 'margincolumn' values < 0 then it is internally set
+ equal to 'textwidth' + 1. So if 'textwidth' is set this results in
+ highlighting the first column after 'textwidth'.
+ If you only want the highlighting in the current window you can use
+ these autocommands: >
+ au WinLeave * set mc=
+ au WinEnter * set mc=-1
+< Note that a maximum of 256 columns are highlighted.
+
*'matchpairs'* *'mps'*
'matchpairs' 'mps' string (default "(:),{:},[:]")
local to buffer
@@ -6010,10 +6029,10 @@
feature}
String to put at the start of lines that have been wrapped. Useful
values are "> " or "+++ ": >
- :set showbreak=>\
+ :set showbreak=>\
< Note the backslash to escape the trailing space. It's easier like
this: >
- :let &showbreak = '+++ '
+ :let &showbreak = '+++ '
< Only printable single-cell characters are allowed, excluding <Tab> and
comma (in a future version the comma might be used to separate the
part that is shown at the end and at the start of a line).
diff -r 9577a28005e1 -r 056c81ad44c9 src/buffer.c
--- a/src/buffer.c Mon Jul 12 21:38:19 2010 +0200
+++ b/src/buffer.c Mon Jul 12 22:47:35 2010 +0200
@@ -1774,6 +1774,7 @@
clear_string_option(&buf->b_p_nf);
#ifdef FEAT_SYN_HL
clear_string_option(&buf->b_p_syn);
+ clear_string_option(&buf->b_p_mc);
#endif
#ifdef FEAT_SPELL
clear_string_option(&buf->b_s.b_p_spc);
diff -r 9577a28005e1 -r 056c81ad44c9 src/option.c
--- a/src/option.c Mon Jul 12 21:38:19 2010 +0200
+++ b/src/option.c Mon Jul 12 22:47:35 2010 +0200
@@ -161,6 +161,7 @@
#ifdef FEAT_SYN_HL
# define PV_SMC OPT_BUF(BV_SMC)
# define PV_SYN OPT_BUF(BV_SYN)
+# define PV_MC OPT_BOTH(OPT_BUF(BV_MC))
#endif
#ifdef FEAT_SPELL
# define PV_SPC OPT_BUF(BV_SPC)
@@ -466,7 +467,7 @@
#if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
|| defined(FEAT_VERTSPLIT) || defined(FEAT_CLIPBOARD) \
|| defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) ||
defined(FEAT_CONCEAL)
-# define HIGHLIGHT_INIT
"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine"
+# define HIGHLIGHT_INIT
"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,g:MarginColumn"
#else
# define HIGHLIGHT_INIT
"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
#endif
@@ -1715,6 +1716,14 @@
{(char_u *)NULL, (char_u *)0L}
#endif
SCRIPTID_INIT},
+ {"margincolumn", "mc", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_RBUF,
+#ifdef FEAT_SYN_HL
+ (char_u *)&p_mc, PV_MC,
+#else
+ (char_u *)NULL, PV_NONE,
+#endif
+ {(char_u *)"", (char_u *)0L}
+ SCRIPTID_INIT},
{"matchpairs", "mps", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
(char_u *)&p_mps, PV_MPS,
{(char_u *)"(:),{:},[:]", (char_u *)0L}
@@ -2526,7 +2535,7 @@
(char_u *)FALSE,
#endif
(char_u *)0L} SCRIPTID_INIT},
- {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM,
+ {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
(char_u *)&p_tw, PV_TW,
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
{"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
@@ -2975,6 +2984,10 @@
static void set_string_option __ARGS((int opt_idx, char_u *value, int
opt_flags));
static char_u *did_set_string_option __ARGS((int opt_idx, char_u **varp, int
new_value_alloced, char_u *oldval, char_u *errbuf, int opt_flags));
static char_u *set_chars_option __ARGS((char_u **varp));
+#ifdef FEAT_SYN_HL
+static int int_cmp __ARGS((const void *a, const void *b));
+static char_u *check_margincolumn __ARGS((char_u **varp));
+#endif
#ifdef FEAT_CLIPBOARD
static char_u *check_clipboard_option __ARGS((void));
#endif
@@ -5226,6 +5239,7 @@
#endif
#ifdef FEAT_SYN_HL
check_string_option(&buf->b_p_syn);
+ check_string_option(&buf->b_p_mc);
#endif
#ifdef FEAT_SPELL
check_string_option(&buf->b_s.b_p_spc);
@@ -5638,6 +5652,12 @@
}
}
+#ifdef FEAT_SYN_HL
+ /* 'margincolumn' */
+ else if (gvarp == &p_mc)
+ errmsg = check_margincolumn(varp);
+#endif
+
#ifdef FEAT_MULTI_LANG
/* 'helplang' */
else if (varp == &p_hlg)
@@ -6911,6 +6931,98 @@
return errmsg;
}
+#ifdef FEAT_SYN_HL
+/*
+ * Simple int comparison function for use with qsort()
+ */
+ static int
+int_cmp(a, b)
+ const void *a;
+ const void *b;
+{
+ return *(const int *)a - *(const int *)b;
+}
+
+/*
+ * Handle setting 'margincolumn'
+ * Returns error message, NULL if it's OK.
+ */
+
+ static char_u *
+check_margincolumn(varp)
+ char_u **varp;
+{
+ int i, col, count = 0;
+ int old_cols[256];
+ int *margin_cols = NULL;
+ char_u **p, *s = *varp;
+
+ margin_cols = (*curbuf->b_p_mc) ? curbuf->b_p_mc_cols :
+ p_mc_cols;
+
+ /* initialize/reset column array */
+ for (i=0; i<256; ++i)
+ {
+ old_cols[i] = margin_cols[i];
+ margin_cols[i] = 0;
+ }
+
+ /* initial zero is definitely not allowed */
+ if (*s == '0')
+ goto margincol_error;
+
+ /* check for validity */
+ while (*s)
+ {
+ if (*s == ',' || *s == '-')
+ {
+ if (*(s+1) == '0')
+ goto margincol_error;
+ }
+ else if (!(VIM_ISDIGIT(*s)))
+ goto margincol_error;
+ s++;
+ }
+
+ s = *varp;
+ p = varp;
+ while (**p && count < 256)
+ {
+ if ((col = (int) getdigits(p)) != 0)
+ {
+ margin_cols[count++] = col;
+ if (**p == ',')
+ (*p)++;
+ }
+ else
+ break;
+ }
+ *varp = s;
+
+ /* sort integer array for faster usage on screen redraw
+ * inside win_line() -> screen.c */
+ if (count > 0)
+ {
+ qsort(margin_cols, count, sizeof(int), int_cmp);
+
+ /* check for duplicates */
+ for (i=0; i<255; ++i)
+ {
+ if (margin_cols[i] && margin_cols[i] == margin_cols[i+1])
+ goto margincol_error;
+ }
+ }
+
+ return NULL;
+
+margincol_error:
+ for (i=0; i<256; ++i)
+ margin_cols[i] = old_cols[i];
+
+ return e_invarg;
+}
+#endif
+
/*
* Handle setting 'listchars' or 'fillchars'.
* Returns error message, NULL if it's OK.
@@ -9251,6 +9363,9 @@
case PV_GP: return (char_u *)&(curbuf->b_p_gp);
case PV_MP: return (char_u *)&(curbuf->b_p_mp);
#endif
+#ifdef FEAT_SYN_HL
+ case PV_MC: return (char_u *)&(curbuf->b_p_mc);
+#endif
case PV_EP: return (char_u *)&(curbuf->b_p_ep);
case PV_KP: return (char_u *)&(curbuf->b_p_kp);
case PV_PATH: return (char_u *)&(curbuf->b_p_path);
@@ -9341,6 +9456,8 @@
#ifdef FEAT_SYN_HL
case PV_CUC: return (char_u *)&(curwin->w_p_cuc);
case PV_CUL: return (char_u *)&(curwin->w_p_cul);
+ case PV_MC: return *curbuf->b_p_mc != NUL
+ ? (char_u *)&(curbuf->b_p_mc) : p->var;
#endif
#ifdef FEAT_DIFF
case PV_DIFF: return (char_u *)&(curwin->w_p_diff);
@@ -9682,7 +9799,7 @@
int did_isk = FALSE;
/*
- * Don't do anything of the buffer is invalid.
+ * Don't do anything if the buffer is invalid.
*/
if (buf == NULL || !buf_valid(buf))
return;
@@ -9849,6 +9966,9 @@
buf->b_p_mp = empty_option;
buf->b_p_efm = empty_option;
#endif
+#ifdef FEAT_SYN_HL
+ buf->b_p_mc = empty_option;
+#endif
buf->b_p_ep = empty_option;
buf->b_p_kp = empty_option;
buf->b_p_path = empty_option;
diff -r 9577a28005e1 -r 056c81ad44c9 src/option.h
--- a/src/option.h Mon Jul 12 21:38:19 2010 +0200
+++ b/src/option.h Mon Jul 12 22:47:35 2010 +0200
@@ -589,6 +589,10 @@
EXTERN char_u *p_mef; /* 'makeef' */
EXTERN char_u *p_mp; /* 'makeprg' */
#endif
+#ifdef FEAT_SYN_HL
+EXTERN char_u *p_mc; /* 'margincolumn' */
+EXTERN int p_mc_cols[256]; /* array for 'margincolumn' columns */
+#endif
EXTERN long p_mat; /* 'matchtime' */
#ifdef FEAT_MBYTE
EXTERN long p_mco; /* 'maxcombine' */
@@ -989,6 +993,7 @@
#ifdef FEAT_SYN_HL
, BV_SMC
, BV_SYN
+ , BV_MC
#endif
#ifdef FEAT_SPELL
, BV_SPC
diff -r 9577a28005e1 -r 056c81ad44c9 src/screen.c
--- a/src/screen.c Mon Jul 12 21:38:19 2010 +0200
+++ b/src/screen.c Mon Jul 12 22:47:35 2010 +0200
@@ -2661,11 +2661,17 @@
int area_attr = 0; /* attributes desired by
highlighting */
int search_attr = 0; /* attributes desired by
'hlsearch' */
#ifdef FEAT_SYN_HL
+ int i;
int vcol_save_attr = 0; /* saved attr for
'cursorcolumn' */
int syntax_attr = 0; /* attributes desired by syntax
*/
int has_syntax = FALSE; /* this buffer has syntax
highl. */
int save_did_emsg;
int eol_hl_off = 0; /* 1 if highlighted char after
EOL */
+ int draw_margin_col = 0; /* only highlight margincolumn
if 1 */
+ int *margin_cols = NULL; /* pointer to according columns
array */
+ int margin_col_idx = 0; /* current index of the array
margin_cols is pointing to */
+ int last_margincol = 0; /* last (rightmost)
margincolumn to highlight */
+ int rightmost_vcol; /* rightmost vcol that needs to
be drawn */
#endif
#ifdef FEAT_SPELL
int has_spell = FALSE; /* this buffer has spell
checking */
@@ -2795,6 +2801,34 @@
extra_check = TRUE;
}
}
+
+ /* Check if local or global 'margincolumn' setting has to be checked */
+ if (*curbuf->b_p_mc)
+ margin_cols = curbuf->b_p_mc_cols;
+ else
+ margin_cols = p_mc_cols;
+
+ /* Check for 'margincolumn'
+ * Only active when 'margincolumn' is set. If 'margincolumn' is only set
+ * to a negative value activate only if 'textwidth' is set too */
+ if (margin_cols[0] != 0)
+ {
+ draw_margin_col = 1;
+ if (margin_cols[0] < 0 && curbuf->b_p_tw <= 0
+ && margin_cols[1] == 0)
+ draw_margin_col = 0;
+
+ /* determine where to start margincolumns */
+ if (margin_cols[0] < 0)
+ margin_col_idx = 1;
+
+ /* determine rightmost margincolumn to possibly draw */
+ for (i=0; margin_cols[i] && i<256; ++i)
+ last_margincol = margin_cols[i];
+
+ if (margin_cols[0] < 0 && curbuf->b_p_tw > last_margincol)
+ last_margincol = curbuf->b_p_tw;
+ }
#endif
#ifdef FEAT_SPELL
@@ -3073,6 +3107,7 @@
#if defined(FEAT_SYN_HL) || defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL)
/* When:
* - 'cuc' is set, or
+ * - 'margincolumn' is set, or
* - 'virtualedit' is set, or
* - the visual mode is active,
* the end of the line may be before the start of the displayed part.
@@ -3080,6 +3115,7 @@
if (vcol < v && (
# ifdef FEAT_SYN_HL
wp->w_p_cuc
+ || draw_margin_col
# if defined(FEAT_VIRTUALEDIT) || defined(FEAT_VISUAL)
||
# endif
@@ -4641,25 +4677,30 @@
--vcol;
}
- /* Highlight 'cursorcolumn' past end of the line. */
+ /* Highlight 'cursorcolumn' & 'margincolumn' past end of the line.
*/
if (wp->w_p_wrap)
v = wp->w_skipcol;
else
v = wp->w_leftcol;
+
/* check if line ends before left margin */
if (vcol < v + col - win_col_off(wp))
-
vcol = v + col - win_col_off(wp);
- if (wp->w_p_cuc
+
+ if (((wp->w_p_cuc
&& (int)wp->w_virtcol >= vcol - eol_hl_off
&& (int)wp->w_virtcol < W_WIDTH(wp) * (row - startrow + 1)
+ v
- && lnum != wp->w_cursor.lnum
+ && lnum != wp->w_cursor.lnum)
+ || draw_margin_col)
# ifdef FEAT_RIGHTLEFT
&& !wp->w_p_rl
# endif
)
{
+ rightmost_vcol = (last_margincol > (long)wp->w_virtcol) ?
+ last_margincol : wp->w_virtcol;
+
while (col < W_WIDTH(wp))
{
ScreenLines[off] = ' ';
@@ -4668,12 +4709,26 @@
ScreenLinesUC[off] = 0;
#endif
++col;
- if (vcol == (long)wp->w_virtcol)
+ if (wp->w_p_cuc && vcol == (long)wp->w_virtcol)
{
- ScreenAttrs[off] = hl_attr(HLF_CUC);
+ ScreenAttrs[off++] = hl_attr(HLF_CUC);
+ }
+ else if (draw_margin_col && ((vcol == curbuf->b_p_tw &&
+ margin_cols[0] < 0) ||
+ vcol == margin_cols[margin_col_idx] - 1))
+ {
+ if (vcol != curbuf->b_p_tw || margin_cols[0] > 0)
+ margin_col_idx++;
+ ScreenAttrs[off++] = hl_attr(HLF_MC);
+ }
+ else
+ {
+ ScreenAttrs[off++] = 0;
+ }
+
+ if (vcol >= rightmost_vcol)
break;
- }
- ScreenAttrs[off++] = 0;
+
++vcol;
}
}
@@ -4737,8 +4792,11 @@
}
#ifdef FEAT_SYN_HL
+ vcol_save_attr = -1;
/* Highlight the cursor column if 'cursorcolumn' is set. But don't
- * highlight the cursor position itself. */
+ * highlight the cursor position itself.
+ * Also highlight the 'margincolumn' if it is different than
+ * 'cursorcolumn' */
if (wp->w_p_cuc && vcol == (long)wp->w_virtcol
&& lnum != wp->w_cursor.lnum
&& draw_state == WL_LINE
@@ -4747,8 +4805,18 @@
vcol_save_attr = char_attr;
char_attr = hl_combine_attr(char_attr, hl_attr(HLF_CUC));
}
- else
- vcol_save_attr = -1;
+ else if (draw_margin_col
+ && ((vcol == curbuf->b_p_tw &&
+ margin_cols[0] < 0) ||
+ vcol == margin_cols[margin_col_idx] - 1)
+ && draw_state == WL_LINE
+ && !lnum_in_visual_area)
+ {
+ if (vcol != curbuf->b_p_tw || margin_cols[0] > 0)
+ margin_col_idx++;
+ vcol_save_attr = char_attr;
+ char_attr = hl_combine_attr(char_attr, hl_attr(HLF_MC));
+ }
#endif
/*
@@ -6376,7 +6444,7 @@
stl = p_stl;
# ifdef FEAT_EVAL
use_sandbox = was_set_insecurely((char_u *)"statusline",
- *wp->w_p_stl == NUL ? 0 : OPT_LOCAL);
+ (*wp->w_p_stl == NUL) ? 0 : OPT_LOCAL);
# endif
}
@@ -9802,7 +9870,8 @@
}
#endif
#if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS)
- if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height)
+ if ((*p_stl != NUL || *curwin->w_p_stl != NUL)
+ && curwin->w_status_height)
{
redraw_custom_statusline(curwin);
}
diff -r 9577a28005e1 -r 056c81ad44c9 src/structs.h
--- a/src/structs.h Mon Jul 12 21:38:19 2010 +0200
+++ b/src/structs.h Mon Jul 12 22:47:35 2010 +0200
@@ -1549,6 +1549,10 @@
char_u *b_p_dict; /* 'dictionary' local value */
char_u *b_p_tsr; /* 'thesaurus' local value */
#endif
+#ifdef FEAT_SYN_HL
+ char_u *b_p_mc; /* 'margincolumn' local value */
+ int b_p_mc_cols[256]; /* array of columns to highlight */
+#endif
#ifdef FEAT_PERSISTENT_UNDO
int b_p_udf; /* 'undofile' */
#endif
diff -r 9577a28005e1 -r 056c81ad44c9 src/syntax.c
--- a/src/syntax.c Mon Jul 12 21:38:19 2010 +0200
+++ b/src/syntax.c Mon Jul 12 22:47:35 2010 +0200
@@ -6531,6 +6531,8 @@
"CursorColumn term=reverse ctermbg=LightGrey guibg=Grey90"),
CENT("CursorLine term=underline cterm=underline",
"CursorLine term=underline cterm=underline guibg=Grey90"),
+ CENT("MarginColumn term=reverse ctermbg=Red",
+ "MarginColumn term=reverse ctermbg=Red guibg=Red"),
#endif
#ifdef FEAT_CONCEAL
CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey",
@@ -6615,6 +6617,8 @@
"CursorColumn term=reverse ctermbg=DarkGrey guibg=Grey40"),
CENT("CursorLine term=underline cterm=underline",
"CursorLine term=underline cterm=underline guibg=Grey40"),
+ CENT("MarginColumn term=reverse ctermbg=DarkRed",
+ "MarginColumn term=reverse ctermbg=DarkRed guibg=DarkRed"),
#endif
#ifdef FEAT_AUTOCMD
CENT("MatchParen term=reverse ctermbg=DarkCyan",
diff -r 9577a28005e1 -r 056c81ad44c9 src/vim.h
--- a/src/vim.h Mon Jul 12 21:38:19 2010 +0200
+++ b/src/vim.h Mon Jul 12 22:47:35 2010 +0200
@@ -1329,6 +1329,7 @@
, HLF_TPF /* tabpage line filler */
, HLF_CUC /* 'cursurcolumn' */
, HLF_CUL /* 'cursurline' */
+ , HLF_MC /* 'margincolumn' */
, HLF_COUNT /* MUST be the last one */
} hlf_T;
@@ -1338,7 +1339,7 @@
'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \
'B', 'P', 'R', 'L', \
- '+', '=', 'x', 'X', '*', '#', '_', '!', '.'}
+ '+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'g'}
/*
* Boolean constants