Skip to content

Commit

Permalink
syntax: 'cursorcolumn', 'colorcolumn': low priority neovim#6380
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk committed Oct 7, 2017
1 parent 9ad7529 commit 7a832c3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
18 changes: 9 additions & 9 deletions runtime/doc/options.txt
Expand Up @@ -6747,19 +6747,19 @@ A jump table for the options with a short description can be found at |Q_op|.
*'winhighlight'* *'winhl'*
'winhighlight' 'winhl' string (default empty)
local to window
Window-local highlights. Comma-delimited list of |group-name| pairs
"{hl-builtin}:{hl-group},..." where each {hl-builtin} is a group (from
|highlight-groups|) to be overridden by {hl-group} in the window where
this option was set. Only builting ui highlights are supported, not
syntax highlighting. For that purpose, use |:ownsyntax|.
Window-local highlights. Comma-delimited list of highlight
|group-name| pairs "{hl-builtin}:{hl},..." where each {hl-builtin} is
a built-in |highlight-groups| item to be overridden by {hl} group in
the window. Only built-in |highlight-groups| are supported, not
syntax highlighting (use |:ownsyntax| for that).

Most highlights occuring within the frame of a window are supported.
Highlights of vertical separators are determined by the window to the
left of the separator. The highlight of a tabpage in |tabline| is
determined by the last focused window in the tabpage. Highlights of
determine by the last-focused window of the tabpage. Highlights of
the popupmenu are determined by the current window. Highlights in the
message area are not overridable. Example for overriding the
backgrond color: >
message area cannot be overridden.

Example: show a different color for non-current windows: >
set winhighlight=Normal:MyNormal,NormalNC:MyNormalNC
<
*'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
Expand Down
4 changes: 4 additions & 0 deletions runtime/doc/vim_diff.txt
Expand Up @@ -280,6 +280,10 @@ other arguments if used).

|input()| and |inputdialog()| support user-defined cmdline highlighting.

Highlight groups:
|hl-ColorColumn|, |hl-CursorColumn| are lower priority than most other
groups

==============================================================================
5. Missing legacy features *nvim-features-missing*

Expand Down
34 changes: 16 additions & 18 deletions src/nvim/screen.c
Expand Up @@ -2201,16 +2201,16 @@ win_line (
int change_end = -1; /* last col of changed area */
colnr_T trailcol = MAXCOL; /* start of trailing spaces */
int need_showbreak = false; // overlong line, skip first x chars
int line_attr = 0; /* attribute for the whole line */
matchitem_T *cur; /* points to the match list */
match_T *shl; /* points to search_hl or a match */
int shl_flag; /* flag to indicate whether search_hl
has been processed or not */
int prevcol_hl_flag; /* flag to indicate whether prevcol
equals startcol of search_hl or one
of the matches */
int prev_c = 0; /* previous Arabic character */
int prev_c1 = 0; /* first composing char for prev_c */
int line_attr = 0; // attribute for the whole line
matchitem_T *cur; // points to the match list
match_T *shl; // points to search_hl or a match
int shl_flag; // flag to indicate whether search_hl
// has been processed or not
int prevcol_hl_flag; // flag to indicate whether prevcol
// equals startcol of search_hl or one
// of the matches
int prev_c = 0; // previous Arabic character
int prev_c1 = 0; // first composing char for prev_c
int did_line_attr = 0;

bool search_attr_from_match = false; // if search_attr is from :match
Expand Down Expand Up @@ -3594,15 +3594,13 @@ win_line (
&& lcs_eol_one > 0) {
// Display a '$' after the line or highlight an extra
// character if the line break is included.
// For a diff line the highlighting continues after the
// "$".
// For a diff line the highlighting continues after the "$".
if (diff_hlf == (hlf_T)0 && line_attr == 0) {
/* In virtualedit, visual selections may extend
* beyond end of line. */
// In virtualedit, visual selections may extend beyond end of line.
if (area_highlighting && virtual_active()
&& tocol != MAXCOL && vcol < tocol)
&& tocol != MAXCOL && vcol < tocol) {
n_extra = 0;
else {
} else {
p_extra = at_end_str;
n_extra = 1;
c_extra = NUL;
Expand Down Expand Up @@ -4035,10 +4033,10 @@ win_line (
if (wp->w_p_cuc && VCOL_HLC == (long)wp->w_virtcol
&& lnum != wp->w_cursor.lnum) {
vcol_save_attr = char_attr;
char_attr = hl_combine_attr(char_attr, win_hl_attr(wp, HLF_CUC));
char_attr = hl_combine_attr(win_hl_attr(wp, HLF_CUC), char_attr);
} else if (draw_color_col && VCOL_HLC == *color_cols) {
vcol_save_attr = char_attr;
char_attr = hl_combine_attr(char_attr, win_hl_attr(wp, HLF_MC));
char_attr = hl_combine_attr(win_hl_attr(wp, HLF_MC), char_attr);
}
}

Expand Down

0 comments on commit 7a832c3

Please sign in to comment.