summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/options.txt17
-rw-r--r--src/change.c5
-rw-r--r--src/highlight.c8
-rw-r--r--src/main.c22
-rw-r--r--src/option.c65
-rw-r--r--src/option.h11
-rw-r--r--src/optiondefs.h5
-rw-r--r--src/screen.c207
-rw-r--r--src/structs.h2
-rw-r--r--src/testdir/dumps/Test_Xcursorline_1.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_10.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_11.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_12.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_13.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_14.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_15.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_16.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_17.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_18.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_2.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_3.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_4.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_5.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_6.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_7.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_8.dump20
-rw-r--r--src/testdir/dumps/Test_Xcursorline_9.dump20
-rw-r--r--src/testdir/dumps/Test_cursorline_yank_01.dump2
-rw-r--r--src/testdir/dumps/Test_textprop_01.dump2
-rw-r--r--src/testdir/dumps/Test_wincolor_01.dump2
-rw-r--r--src/testdir/gen_opt_test.vim2
-rw-r--r--src/testdir/test_cursorline.vim94
-rw-r--r--src/version.c2
33 files changed, 740 insertions, 66 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 0c8589f74..9fa2bfb3a 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2468,17 +2468,24 @@ A jump table for the options with a short description can be found at |Q_op|.
*'cursorlineopt'* *'culopt'*
-'cursorlineopt' 'culopt' string (default: "both")
+'cursorlineopt' 'culopt' string (default: "number,line")
local to window
{not in Vi}
{not available when compiled without the |+syntax|
feature}
- Settings for how 'cursorline' is displayed. Valid values:
- "line" Highlight the text line of the cursor with
+ Comma separated list of settings for how 'cursorline' is displayed.
+ Valid values:
+ "line" Highlight the text line of the cursor with
CursorLine |hl-CursorLine|.
- "number" Highlight the line number of the cursor with
+ "screenline" Highlight only the screen line of the cursor with
+ CursorLine |hl-CursorLine|.
+ "number" Highlight the line number of the cursor with
CursorLineNr |hl-CursorLineNr|.
- "both" Highlight as both "line" and "number" are set.
+
+ Special value:
+ "both" Alias for the values "line,number".
+
+ "line" and "screenline" cannot be used together.
*'debug'*
diff --git a/src/change.c b/src/change.c
index 13218999b..8eec45257 100644
--- a/src/change.c
+++ b/src/change.c
@@ -593,10 +593,11 @@ changed_common(
#endif
// Relative numbering may require updating more. Cursor line
// highlighting probably needs to be updated if it's below the
- // change.
+ // change (or is using screenline highlighting)
if (wp->w_p_rnu
#ifdef FEAT_SYN_HL
- || (wp->w_p_cul && lnum <= wp->w_last_cursorline)
+ || ((wp->w_p_cul && lnum <= wp->w_last_cursorline)
+ || (wp->w_p_culopt_flags & CULOPT_SCRLINE))
#endif
)
redraw_win_later(wp, SOME_VALID);
diff --git a/src/highlight.c b/src/highlight.c
index 8901994eb..725affcbf 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -161,8 +161,8 @@ static char *(highlight_init_light[]) = {
"Directory term=bold ctermfg=DarkBlue guifg=Blue"),
CENT("LineNr term=underline ctermfg=Brown",
"LineNr term=underline ctermfg=Brown guifg=Brown"),
- CENT("CursorLineNr term=bold ctermfg=Brown",
- "CursorLineNr term=bold ctermfg=Brown gui=bold guifg=Brown"),
+ CENT("CursorLineNr term=bold cterm=underline ctermfg=Brown",
+ "CursorLineNr term=bold cterm=underline ctermfg=Brown gui=bold guifg=Brown"),
CENT("MoreMsg term=bold ctermfg=DarkGreen",
"MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen"),
CENT("Question term=standout ctermfg=DarkGreen",
@@ -252,8 +252,8 @@ static char *(highlight_init_dark[]) = {
"Directory term=bold ctermfg=LightCyan guifg=Cyan"),
CENT("LineNr term=underline ctermfg=Yellow",
"LineNr term=underline ctermfg=Yellow guifg=Yellow"),
- CENT("CursorLineNr term=bold ctermfg=Yellow",
- "CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow"),
+ CENT("CursorLineNr term=bold cterm=underline ctermfg=Yellow",
+ "CursorLineNr term=bold cterm=underline ctermfg=Yellow gui=bold guifg=Yellow"),
CENT("MoreMsg term=bold ctermfg=LightGreen",
"MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen"),
CENT("Question term=standout ctermfg=LightGreen",
diff --git a/src/main.c b/src/main.c
index 6fe581ce7..d1d9e32e4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1255,12 +1255,28 @@ main_loop(
update_topline();
validate_cursor();
+#ifdef FEAT_SYN_HL
+ if (curwin->w_p_cul && curwin->w_p_wrap
+ && (curwin->w_p_culopt_flags & CULOPT_SCRLINE))
+ must_redraw = NOT_VALID;
+#endif
+
if (VIsual_active)
- update_curbuf(INVERTED);/* update inverted part */
+ update_curbuf(INVERTED); // update inverted part
else if (must_redraw)
{
- mch_disable_flush(); /* Stop issuing gui_mch_flush(). */
- update_screen(0);
+ mch_disable_flush(); // Stop issuing gui_mch_flush().
+#ifdef FEAT_SYN_HL
+ // Might need some more update for the cursorscreen line.
+ // TODO: can we optimize this?
+ if (curwin->w_p_cul
+ && curwin->w_p_wrap
+ && (curwin->w_p_culopt_flags & CULOPT_SCRLINE)
+ && !char_avail())
+ update_screen(VALID);
+ else
+#endif
+ update_screen(0);
mch_enable_flush();
}
else if (redraw_cmdline || clear_cmdline)
diff --git a/src/option.c b/src/option.c
index c279acf13..99e046f3f 100644
--- a/src/option.c
+++ b/src/option.c
@@ -88,6 +88,9 @@ static int check_opt_wim(void);
#ifdef FEAT_LINEBREAK
static int briopt_check(win_T *wp);
#endif
+#ifdef FEAT_SYN_HL
+static int fill_culopt_flags(char_u *val, win_T *wp);
+#endif
/*
* Initialize the options, first part.
@@ -2447,7 +2450,9 @@ didset_options(void)
/* initialize the table for 'breakat'. */
fill_breakat_flags();
#endif
-
+#ifdef FEAT_SYN_HL
+ fill_culopt_flags(NULL, curwin);
+#endif
}
/*
@@ -3136,8 +3141,7 @@ did_set_string_option(
else if (varp == &curwin->w_p_culopt
|| gvarp == &curwin->w_allbuf_opt.wo_culopt)
{
- if (**varp == NUL
- || check_opt_strings(*varp, p_culopt_values, FALSE) != OK)
+ if (**varp == NUL || fill_culopt_flags(*varp, curwin) != OK)
errmsg = e_invarg;
}
@@ -7781,6 +7785,9 @@ win_copy_options(win_T *wp_from, win_T *wp_to)
#if defined(FEAT_LINEBREAK)
briopt_check(wp_to);
#endif
+#ifdef FEAT_SYN_HL
+ fill_culopt_flags(NULL, wp_to);
+#endif
}
/*
@@ -9515,3 +9522,55 @@ get_winbuf_options(int bufopt)
return d;
}
#endif
+
+#ifdef FEAT_SYN_HL
+/*
+ * This is called when 'culopt' is changed
+ */
+ static int
+fill_culopt_flags(char_u *val, win_T *wp)
+{
+ char_u *p;
+ char_u culopt_flags_new = 0;
+
+ if (val == NULL)
+ p = wp->w_p_culopt;
+ else
+ p = val;
+ while (*p != NUL)
+ {
+ if (STRNCMP(p, "line", 4) == 0)
+ {
+ p += 4;
+ culopt_flags_new |= CULOPT_LINE;
+ }
+ else if (STRNCMP(p, "both", 4) == 0)
+ {
+ p += 4;
+ culopt_flags_new |= CULOPT_LINE | CULOPT_NBR;
+ }
+ else if (STRNCMP(p, "number", 6) == 0)
+ {
+ p += 6;
+ culopt_flags_new |= CULOPT_NBR;
+ }
+ else if (STRNCMP(p, "screenline", 10) == 0)
+ {
+ p += 10;
+ culopt_flags_new |= CULOPT_SCRLINE;
+ }
+
+ if (*p != ',' && *p != NUL)
+ return FAIL;
+ if (*p == ',')
+ ++p;
+ }
+
+ // Can't have both "line" and "screenline".
+ if ((culopt_flags_new & CULOPT_LINE) && (culopt_flags_new & CULOPT_SCRLINE))
+ return FAIL;
+ wp->w_p_culopt_flags = culopt_flags_new;
+
+ return OK;
+}
+#endif
diff --git a/src/option.h b/src/option.h
index 76d67d9de..bb68d5afc 100644
--- a/src/option.h
+++ b/src/option.h
@@ -287,15 +287,20 @@
#define STL_ALL ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMqpPaN{#")
// flags used for parsed 'wildmode'
-#define WIM_FULL 1
-#define WIM_LONGEST 2
-#define WIM_LIST 4
+#define WIM_FULL 0x01
+#define WIM_LONGEST 0x02
+#define WIM_LIST 0x04
// arguments for can_bs()
#define BS_INDENT 'i' // "Indent"
#define BS_EOL 'o' // "eOl"
#define BS_START 's' // "Start"
+// flags for the 'culopt' option
+#define CULOPT_LINE 0x01 // Highlight complete line
+#define CULOPT_SCRLINE 0x02 // Highlight screen line
+#define CULOPT_NBR 0x04 // Highlight Number column
+
#define LISPWORD_VALUE "defun,define,defmacro,set!,lambda,if,case,let,flet,let*,letrec,do,do*,define-syntax,let-syntax,letrec-syntax,destructuring-bind,defpackage,defparameter,defstruct,deftype,defvar,do-all-symbols,do-external-symbols,do-symbols,dolist,dotimes,ecase,etypecase,eval-when,labels,macrolet,multiple-value-bind,multiple-value-call,multiple-value-prog1,multiple-value-setq,prog1,progv,typecase,unless,unwind-protect,when,with-input-from-string,with-open-file,with-open-stream,with-output-to-string,with-package-iterator,define-condition,handler-bind,handler-case,restart-bind,restart-case,with-simple-restart,store-value,use-value,muffle-warning,abort,continue,with-slots,with-slots*,with-accessors,with-accessors*,defclass,defmethod,print-unreadable-object"
/*
diff --git a/src/optiondefs.h b/src/optiondefs.h
index 3897fd7bf..8e9d3f932 100644
--- a/src/optiondefs.h
+++ b/src/optiondefs.h
@@ -958,7 +958,7 @@ static struct vimoption options[] =
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)FALSE, (char_u *)0L} SCTX_INIT},
- {"cursorlineopt", "culopt", P_STRING|P_VI_DEF|P_RWIN,
+ {"cursorlineopt", "culopt", P_STRING|P_VI_DEF|P_RWIN|P_ONECOMMA|P_NODUP,
#ifdef FEAT_SYN_HL
(char_u *)VAR_WIN, PV_CULOPT,
#else
@@ -3200,6 +3200,3 @@ static char *(p_scl_values[]) = {"yes", "no", "auto", "number", NULL};
#if defined(MSWIN) && defined(FEAT_TERMINAL)
static char *(p_twt_values[]) = {"winpty", "conpty", "", NULL};
#endif
-#ifdef FEAT_SYN_HL
-static char *(p_culopt_values[]) = {"line", "number", "both", NULL};
-#endif
diff --git a/src/screen.c b/src/screen.c
index eb71d7678..4ea0cffbd 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -158,6 +158,9 @@ static void win_redr_custom(win_T *wp, int draw_ruler);
#ifdef FEAT_CMDL_INFO
static void win_redr_ruler(win_T *wp, int always, int ignore_pum);
#endif
+#ifdef FEAT_SYN_HL
+static void margin_columns_win(win_T *wp, int *left_col, int *right_col);
+#endif
/* Ugly global: overrule attribute used by screen_char() */
static int screen_char_attr = 0;
@@ -3270,7 +3273,8 @@ win_line(
#if defined(FEAT_SIGNS) || defined(FEAT_QUICKFIX) \
|| defined(FEAT_SYN_HL) || defined(FEAT_DIFF)
# define LINE_ATTR
- int line_attr = 0; /* attribute for the whole line */
+ int line_attr = 0; // attribute for the whole line
+ int line_attr_save;
#endif
#ifdef FEAT_SIGNS
int sign_present = FALSE;
@@ -3286,6 +3290,17 @@ win_line(
#ifdef FEAT_TERMINAL
int get_term_attr = FALSE;
#endif
+#ifdef FEAT_SYN_HL
+ int cul_attr = 0; // set when 'cursorline' active
+
+ // 'cursorlineopt' has "screenline" and cursor is in this line
+ int cul_screenline = FALSE;
+
+ // margin columns for the screen line, needed for when 'cursorlineopt'
+ // contains "screenline"
+ int left_curline_col = 0;
+ int right_curline_col = 0;
+#endif
/* draw_state: items that are drawn in sequence: */
#define WL_START 0 /* nothing done yet */
@@ -3815,14 +3830,33 @@ win_line(
// Cursor line highlighting for 'cursorline' in the current window.
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
{
- // Do not show the cursor line when Visual mode is active, because it's
- // not clear what is selected then. Do update w_last_cursorline.
- if (!(wp == curwin && VIsual_active) && *wp->w_p_culopt != 'n')
+ // Do not show the cursor line in the text when Visual mode is active,
+ // because it's not clear what is selected then. Do update
+ // w_last_cursorline.
+ if (!(wp == curwin && VIsual_active)
+ && wp->w_p_culopt_flags != CULOPT_NBR)
{
- line_attr = HL_ATTR(HLF_CUL);
+ cul_screenline = (wp->w_p_wrap
+ && (wp->w_p_culopt_flags & CULOPT_SCRLINE));
+
+ // Only set line_attr here when "screenline" is not present in
+ // 'cursorlineopt'. Otherwise it's done later.
+ if (!cul_screenline)
+ {
+ cul_attr = HL_ATTR(HLF_CUL);
+ line_attr = cul_attr;
+ wp->w_last_cursorline = wp->w_cursor.lnum;
+ }
+ else
+ {
+ line_attr_save = line_attr;
+ wp->w_last_cursorline = 0;
+ margin_columns_win(wp, &left_curline_col, &right_curline_col);
+ }
area_highlighting = TRUE;
}
- wp->w_last_cursorline = wp->w_cursor.lnum;
+ else
+ wp->w_last_cursorline = wp->w_cursor.lnum;
}
#endif
@@ -4016,13 +4050,17 @@ win_line(
n_extra = number_width(wp) + 1;
char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_N));
#ifdef FEAT_SYN_HL
- /* When 'cursorline' is set highlight the line number of
- * the current line differently.
- * TODO: Can we use CursorLine instead of CursorLineNr
- * when CursorLineNr isn't set? */
+ // When 'cursorline' is set highlight the line number of
+ // the current line differently.
+ // When 'cursorlineopt' has "screenline" only highlight
+ // the line number itself.
+ // TODO: Can we use CursorLine instead of CursorLineNr
+ // when CursorLineNr isn't set?
if ((wp->w_p_cul || wp->w_p_rnu)
- && *wp->w_p_culopt != 'l'
- && lnum == wp->w_cursor.lnum)
+ && (wp->w_p_culopt_flags & CULOPT_NBR)
+ && (row == startrow
+ || wp->w_p_culopt_flags & CULOPT_LINE)
+ && lnum == wp->w_cursor.lnum)
char_attr = hl_combine_attr(wcr_attr, HL_ATTR(HLF_CLN));
#endif
}
@@ -4056,10 +4094,8 @@ win_line(
{
char_attr = HL_ATTR(diff_hlf);
# ifdef FEAT_SYN_HL
- if (wp->w_p_cul && lnum == wp->w_cursor.lnum
- && *wp->w_p_culopt != 'n')
- char_attr = hl_combine_attr(char_attr,
- HL_ATTR(HLF_CUL));
+ if (cul_attr != 0)
+ char_attr = hl_combine_attr(char_attr, cul_attr);
# endif
}
# endif
@@ -4117,13 +4153,11 @@ win_line(
* required when 'linebreak' is also set. */
if (tocol == vcol)
tocol += n_extra;
-#ifdef FEAT_SYN_HL
- /* combine 'showbreak' with 'cursorline' */
- if (wp->w_p_cul && lnum == wp->w_cursor.lnum
- && *wp->w_p_culopt != 'n')
- char_attr = hl_combine_attr(char_attr,
- HL_ATTR(HLF_CUL));
-#endif
+# ifdef FEAT_SYN_HL
+ // combine 'showbreak' with 'cursorline'
+ if (cul_attr != 0)
+ char_attr = hl_combine_attr(char_attr, cul_attr);
+# endif
}
# endif
}
@@ -4145,6 +4179,23 @@ win_line(
char_attr = win_attr;
}
}
+#ifdef FEAT_SYN_HL
+ if (cul_screenline)
+ {
+ if (draw_state == WL_LINE
+ && vcol >= left_curline_col
+ && vcol < right_curline_col)
+ {
+ cul_attr = HL_ATTR(HLF_CUL);
+ line_attr = cul_attr;
+ }
+ else
+ {
+ cul_attr = 0;
+ line_attr = line_attr_save;
+ }
+ }
+#endif
// When still displaying '$' of change command, stop at cursor.
// When only displaying the (relative) line number and that's done,
@@ -4216,8 +4267,11 @@ win_line(
diff_hlf = HLF_CHD; /* changed line */
line_attr = HL_ATTR(diff_hlf);
if (wp->w_p_cul && lnum == wp->w_cursor.lnum
- && *wp->w_p_culopt != 'n')
- line_attr = hl_combine_attr(line_attr, HL_ATTR(HLF_CUL));
+ && wp->w_p_culopt_flags != CULOPT_NBR
+ && (!cul_screenline || (vcol >= left_curline_col
+ && vcol <= right_curline_col)))
+ line_attr = hl_combine_attr(
+ line_attr, HL_ATTR(HLF_CUL));
}
#endif
@@ -4301,9 +4355,12 @@ win_line(
else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
|| vcol < fromcol || vcol_prev < fromcol_prev
|| vcol >= tocol))
+ {
// Use line_attr when not in the Visual or 'incsearch' area
// (area_attr may be 0 when "noinvcur" is set).
char_attr = line_attr;
+ attr_pri = FALSE;
+ }
#else
if (area_attr != 0)
char_attr = area_attr;
@@ -4410,6 +4467,10 @@ win_line(
mb_l = 1;
mb_utf8 = FALSE;
multi_attr = HL_ATTR(HLF_AT);
+#ifdef FEAT_SYN_HL
+ if (cul_attr)
+ multi_attr = hl_combine_attr(multi_attr, cul_attr);
+#endif
/* put the pointer back to output the double-width
* character at the start of the next line. */
++n_extra;
@@ -4672,10 +4733,10 @@ win_line(
if (win_attr != 0)
syntax_attr = hl_combine_attr(win_attr, syntax_attr);
-#ifdef SYN_TIME_LIMIT
+# ifdef SYN_TIME_LIMIT
if (wp->w_s->b_syn_slow)
has_syntax = FALSE;
-#endif
+# endif
/* Need to get the line again, a multi-line regexp may
* have made it invalid. */
@@ -4692,7 +4753,15 @@ win_line(
comb_attr = hl_combine_attr(text_prop_attr, comb_attr);
# endif
if (!attr_pri)
- char_attr = comb_attr;
+ {
+#ifdef FEAT_SYN_HL
+ if (cul_attr)
+ char_attr = hl_combine_attr(
+ comb_attr, cul_attr);
+ else
+#endif
+ char_attr = comb_attr;
+ }
else
char_attr = hl_combine_attr(comb_attr, char_attr);
}
@@ -5185,9 +5254,12 @@ win_line(
{
char_attr = HL_ATTR(diff_hlf);
if (wp->w_p_cul && lnum == wp->w_cursor.lnum
- && *wp->w_p_culopt != 'n')
- char_attr = hl_combine_attr(char_attr,
- HL_ATTR(HLF_CUL));
+ && wp->w_p_culopt_flags != CULOPT_NBR
+ && (!cul_screenline
+ || (vcol >= left_curline_col
+ && vcol <= right_curline_col)))
+ char_attr = hl_combine_attr(
+ char_attr, HL_ATTR(HLF_CUL));
}
}
# endif
@@ -5196,8 +5268,12 @@ win_line(
{
char_attr = win_attr;
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
- char_attr = hl_combine_attr(char_attr,
- HL_ATTR(HLF_CUL));
+ {
+ if (!cul_screenline || (vcol >= left_curline_col
+ && vcol <= right_curline_col))
+ char_attr = hl_combine_attr(
+ char_attr, HL_ATTR(HLF_CUL));
+ }
else if (line_attr)
char_attr = hl_combine_attr(char_attr, line_attr);
}
@@ -5305,7 +5381,12 @@ win_line(
if (n_attr > 0
&& draw_state == WL_LINE
&& !attr_pri)
- char_attr = extra_attr;
+ {
+ if (line_attr)
+ char_attr = hl_combine_attr(extra_attr, line_attr);
+ else
+ char_attr = extra_attr;
+ }
#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
/* XIM don't send preedit_start and preedit_end, but they send
@@ -5969,7 +6050,16 @@ win_line(
saved_p_extra = p_extra;
saved_c_extra = c_extra;
saved_c_final = c_final;
- saved_char_attr = char_attr;
+#ifdef FEAT_SYN_HL
+ if (!(cul_screenline
+# ifdef FEAT_DIFF
+ && diff_hlf == (hlf_T)0)
+# endif
+ )
+ saved_char_attr = char_attr;
+ else
+#endif
+ saved_char_attr = 0;
n_extra = 0;
lcs_prec_todo = lcs_prec;
#ifdef FEAT_LINEBREAK
@@ -11024,3 +11114,50 @@ set_chars_option(char_u **varp)
return NULL; // no error
}
+
+#ifdef FEAT_SYN_HL
+/*
+ * Used when 'cursorlineopt' contains "screenline": compute the margins between
+ * which the highlighting is used.
+ */
+ static void
+margin_columns_win(win_T *wp, int *left_col, int *right_col)
+{
+ // cache previous calculations depending on w_virtcol
+ static int saved_w_virtcol;
+ static win_T *prev_wp;
+ static int prev_left_col;
+ static int prev_right_col;
+ static int prev_col_off;
+
+ int cur_col_off = win_col_off(wp);
+ int width1;
+ int width2;
+
+ if (saved_w_virtcol == wp->w_virtcol
+ && prev_wp == wp && prev_col_off == cur_col_off)
+ {
+ *right_col = prev_right_col;
+ *left_col = prev_left_col;
+ return;
+ }
+
+ width1 = wp->w_width - cur_col_off;
+ width2 = width1 + win_col_off2(wp);
+
+ *left_col = 0;
+ *right_col = width1;
+
+ if (wp->w_virtcol >= (colnr_T)width1)
+ *right_col = width1 + ((wp->w_virtcol - width1) / width2 + 1) * width2;
+ if (wp->w_virtcol >= (colnr_T)width1 && width2 > 0)
+ *left_col = (wp->w_virtcol - width1) / width2 * width2 + width1;
+
+ // cache values
+ prev_left_col = *left_col;
+ prev_right_col = *right_col;
+ prev_wp = wp;
+ saved_w_virtcol = wp->w_virtcol;
+ prev_col_off = cur_col_off;
+}
+#endif
diff --git a/src/structs.h b/src/structs.h
index ab94a32e8..2dc14c2e2 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -3207,6 +3207,7 @@ struct window_S
#endif
#ifdef FEAT_SYN_HL
int *w_p_cc_cols; // array of columns to highlight or NULL
+ char_u w_p_culopt_flags; // flags for cursorline highlighting
#endif
#ifdef FEAT_LINEBREAK
int w_p_brimin; // minimum width for breakindent
@@ -3288,7 +3289,6 @@ struct window_S
qf_info_T *w_llist_ref;
#endif
-
#ifdef FEAT_MZSCHEME
void *w_mzscheme_ref; // The MzScheme value for this window
#endif
diff --git a/src/testdir/dumps/Test_Xcursorline_1.dump b/src/testdir/dumps/Test_Xcursorline_1.dump
new file mode 100644
index 000000000..e4176e10e
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_1.dump
@@ -0,0 +1,20 @@
+| +0#af5f00255#ffffff0@1|1| >1+8#0000000&| |f|o@7| |a|r| |e|i|n|s|<+8#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f| |s|e|c|h|s| |s|i|e|b|e|n| |a|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&| |u|n| |z|e|h|n| |e|l|f| |z|w|ö|f|l| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n| @2|v| |i|e|r|z|e|h|n||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&| +0#0000000&@6|f|ü|n|f|z|e|h|n| @4||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|1| @5|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_Xcursorline_10.dump b/src/testdir/dumps/Test_Xcursorline_10.dump
new file mode 100644
index 000000000..152246a29
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_10.dump
@@ -0,0 +1,20 @@
+| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+8#0000000&|-+8#0000e05&|u+8#0000000&|n|-+8#0000e05&|z+8#0000000&|e|h|n|-+8#0000e05&|e+8#0000000&>l|f|-+8#0000e05&|z+8#0000000&|w|ö|f|l|-+8#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z|e|h|n|^+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|I+0#0000e05&|f+0#0000000&|ü|n|f|z|e|h|n| @10||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|7|1|-|7|6| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |l|i|s|t| |c|u|r|s|o|r|l|i|n|e|o|p|t|+|=|n|u|m|b|e|r| |l|i|s|t|c|h|a|r|s|=|s|p|a|c|e|:|-| @25
diff --git a/src/testdir/dumps/Test_Xcursorline_11.dump b/src/testdir/dumps/Test_Xcursorline_11.dump
new file mode 100644
index 000000000..5c0fb24b0
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_11.dump
@@ -0,0 +1,20 @@
+| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&|-+0#0000e05&|u+0#0000000&|n|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+8#0000000&|r|e|i|z|e|h|n|^+8#0000e05&|I|v+8#0000000&>-+8#0000e05&|i+8#0000000&|e|r|z|e|h|n|^+8#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|I+0#0000e05&|f+0#0000000&|ü|n|f|z|e|h|n| @10||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|9|1|-|9|8| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |l|i|s|t| |c|u|r|s|o|r|l|i|n|e|o|p|t|+|=|n|u|m|b|e|r| |l|i|s|t|c|h|a|r|s|=|s|p|a|c|e|:|-| @25
diff --git a/src/testdir/dumps/Test_Xcursorline_12.dump b/src/testdir/dumps/Test_Xcursorline_12.dump
new file mode 100644
index 000000000..10fb12058
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_12.dump
@@ -0,0 +1,20 @@
+| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&|-+0#0000e05&|u+0#0000000&|n|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z|e|h|n|^+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|I+8#0000e05&|f+8#0000000&|ü|n|f|z|e|h>n| @10||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|1|0|8|-|1|2|1| @3|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |l|i|s|t| |c|u|r|s|o|r|l|i|n|e|o|p|t|+|=|n|u|m|b|e|r| |l|i|s|t|c|h|a|r|s|=|s|p|a|c|e|:|-| @25
diff --git a/src/testdir/dumps/Test_Xcursorline_13.dump b/src/testdir/dumps/Test_Xcursorline_13.dump
new file mode 100644
index 000000000..6ceb93a80
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_13.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@3| +8#4040ff13#ffffff0@1|1| >1+8#0000000&|-+8#0000e05&|f+8#0000000&|o@7|-+8#0000e05&|a+8#0000000&|r|-+8#0000e05&|e+8#0000000&|i||+1&&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|n+0#0000000&|s|<+0#0000e05&|2|0@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|s+0#0000000&|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h|t|-+0#0000e05&|u+0#0000000&|n||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|h|n|^+0#0000e05&|I|f+0#0000000&|ü|n|f|z|e|h|n| @2||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|1| @5|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30
diff --git a/src/testdir/dumps/Test_Xcursorline_14.dump b/src/testdir/dumps/Test_Xcursorline_14.dump
new file mode 100644
index 000000000..e7379536a
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_14.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@3| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i||+1&&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|n+8#0000000&|s|<+8#0000e05&|2|0@1|d|>|z+8#0000000&|w|e>i|-+8#0000e05&|d+8#0000000&|r|e||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|s+0#0000000&|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h|t|-+0#0000e05&|u+0#0000000&|n||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|h|n|^+0#0000e05&|I|f+0#0000000&|ü|n|f|z|e|h|n| @2||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|2|6|-|3|0| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30
diff --git a/src/testdir/dumps/Test_Xcursorline_15.dump b/src/testdir/dumps/Test_Xcursorline_15.dump
new file mode 100644
index 000000000..b7ae563bb
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_15.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@3| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i||+1&&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|n+0#0000000&|s|<+0#0000e05&|2|0@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+8#0000000&|-+8#0000e05&|v+8#0000000&|i|e|r|-+8#0000e05&|f+8#0000000&|ü|n|f>-+8#0000e05&|s+8#0000000&|e|c|h||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|s+0#0000000&|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h|t|-+0#0000e05&|u+0#0000000&|n||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|h|n|^+0#0000e05&|I|f+0#0000000&|ü|n|f|z|e|h|n| @2||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|4|3|-|4|7| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30
diff --git a/src/testdir/dumps/Test_Xcursorline_16.dump b/src/testdir/dumps/Test_Xcursorline_16.dump
new file mode 100644
index 000000000..b59e24a52
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_16.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@3| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i||+1&&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|n+0#0000000&|s|<+0#0000e05&|2|0@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|s+8#0000000&|-+8#0000e05&|s+8#0000000&|i|e|b|e|n|-+8#0000e05&|a+8#0000000&|c>h|t|-+8#0000e05&|u+8#0000000&|n||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|h|n|^+0#0000e05&|I|f+0#0000000&|ü|n|f|z|e|h|n| @2||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|5|9|-|6|4| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30
diff --git a/src/testdir/dumps/Test_Xcursorline_17.dump b/src/testdir/dumps/Test_Xcursorline_17.dump
new file mode 100644
index 000000000..8f41c9022
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_17.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@3| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i||+1&&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|n+0#0000000&|s|<+0#0000e05&|2|0@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|s+0#0000000&|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h|t|-+0#0000e05&|u+0#0000000&|n||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|-+8#0000e05&|z+8#0000000&|e|h|n|-+8#0000e05&|e+8#0000000&|l|f|-+8#0000e05&|z+8#0000000&>w|ö|f|l|-+8#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|h|n|^+0#0000e05&|I|f+0#0000000&|ü|n|f|z|e|h|n| @2||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|7|5|-|8|1| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30
diff --git a/src/testdir/dumps/Test_Xcursorline_18.dump b/src/testdir/dumps/Test_Xcursorline_18.dump
new file mode 100644
index 000000000..974cea363
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_18.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@3| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i||+1&&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|n+0#0000000&|s|<+0#0000e05&|2|0@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|s+0#0000000&|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h|t|-+0#0000e05&|u+0#0000000&|n||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|d+8#0000000&|r|e|i|z|e|h|n|^+8#0000e05&|I|v+8#0000000&>-+8#0000e05&|i+8#0000000&|e|r|z||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|h|n|^+0#0000e05&|I|f+0#0000000&|ü|n|f|z|e|h|n| @2||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|b|e|n| @11||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|i+0#0000000&|n|s|-+0#0000e05&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i||+1&&|~+0#4040ff13&| @47
+| +0#0000e05#a8a8a8255@3| +0#af5f00255#ffffff0@3|>+0#4040ff13&|e+0#0000000&|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|@+0#4040ff13&@2||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|9|1|-|9|8| @1|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |b|r|e|a|k|i|n|d|e|n|t| |f|o|l|d|c|o|l|u|m|n|=|2| |s|i|g|n|c|o|l|u|m|n|=|y|e|s| @30
diff --git a/src/testdir/dumps/Test_Xcursorline_2.dump b/src/testdir/dumps/Test_Xcursorline_2.dump
new file mode 100644
index 000000000..ef2a07d15
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_2.dump
@@ -0,0 +1,20 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| |f|o@7| |a|r| |e|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+8#0000e05&@1|d|>|z+8#0000000&|w|e|i| |d|r>e|i| |v|i|e|r| |f||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f| |s|e|c|h|s| |s|i|e|b|e|n| |a|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&| |u|n| |z|e|h|n| |e|l|f| |z|w|ö|f|l| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n| @2|v| |i|e|r|z|e|h|n||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&| +0#0000000&@6|f|ü|n|f|z|e|h|n| @4||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|3|0|-|3|4| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_Xcursorline_3.dump b/src/testdir/dumps/Test_Xcursorline_3.dump
new file mode 100644
index 000000000..69a85bd9e
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_3.dump
@@ -0,0 +1,20 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| |f|o@7| |a|r| |e|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+8#0000000&|n|f| |s|e|c|h|s| |s>i|e|b|e|n| |a|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&| |u|n| |z|e|h|n| |e|l|f| |z|w|ö|f|l| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n| @2|v| |i|e|r|z|e|h|n||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&| +0#0000000&@6|f|ü|n|f|z|e|h|n| @4||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|5|1|-|5@1| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_Xcursorline_4.dump b/src/testdir/dumps/Test_Xcursorline_4.dump
new file mode 100644
index 000000000..253312be6
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_4.dump
@@ -0,0 +1,20 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| |f|o@7| |a|r| |e|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f| |s|e|c|h|s| |s|i|e|b|e|n| |a|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+8#0000000&| |u|n| |z|e|h|n| |e>l|f| |z|w|ö|f|l| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n| @2|v| |i|e|r|z|e|h|n||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&| +0#0000000&@6|f|ü|n|f|z|e|h|n| @4||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|7|1|-|7|6| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_Xcursorline_5.dump b/src/testdir/dumps/Test_Xcursorline_5.dump
new file mode 100644
index 000000000..f86e708d3
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_5.dump
@@ -0,0 +1,20 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| |f|o@7| |a|r| |e|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f| |s|e|c|h|s| |s|i|e|b|e|n| |a|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&| |u|n| |z|e|h|n| |e|l|f| |z|w|ö|f|l| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+8#0000000&|r|e|i|z|e|h|n| @2>v| |i|e|r|z|e|h|n||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&| +0#0000000&@6|f|ü|n|f|z|e|h|n| @4||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|9|0|-|9|7| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_Xcursorline_6.dump b/src/testdir/dumps/Test_Xcursorline_6.dump
new file mode 100644
index 000000000..1266b090a
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_6.dump
@@ -0,0 +1,20 @@
+| +0#af5f00255#ffffff0@1|1| |1+0#0000000&| |f|o@7| |a|r| |e|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f| |s|e|c|h|s| |s|i|e|b|e|n| |a|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&| |u|n| |z|e|h|n| |e|l|f| |z|w|ö|f|l| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n| @2|v| |i|e|r|z|e|h|n||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&| +8#0000000&@6|f|ü|n|f>z|e|h|n| @4||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&| |f|o@7| |b|a|r| |e|i|n|s| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i| |d|r|e|i| |v|i|e|r| |f|ü|n|f| ||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s| |s|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|1|0|5|-|1@1|8| @3|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+| +0&&@74
diff --git a/src/testdir/dumps/Test_Xcursorline_7.dump b/src/testdir/dumps/Test_Xcursorline_7.dump
new file mode 100644
index 000000000..5e4369bed
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_7.dump
@@ -0,0 +1,20 @@
+| +8#4040ff13#ffffff0@1|1| >1+8#0000000&|-+8#0000e05&|f+8#0000000&|o@7|-+8#0000e05&|a+8#0000000&|r|-+8#0000e05&|e+8#0000000&|i|n|s|<+8#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&|-+0#0000e05&|u+0#0000000&|n|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z|e|h|n|^+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|I+0#0000e05&|f+0#0000000&|ü|n|f|z|e|h|n| @10||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|1| @5|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |l|i|s|t| |c|u|r|s|o|r|l|i|n|e|o|p|t|+|=|n|u|m|b|e|r| |l|i|s|t|c|h|a|r|s|=|s|p|a|c|e|:|-| @25
diff --git a/src/testdir/dumps/Test_Xcursorline_8.dump b/src/testdir/dumps/Test_Xcursorline_8.dump
new file mode 100644
index 000000000..8fd8dba9b
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_8.dump
@@ -0,0 +1,20 @@
+| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+8#0000e05&@1|d|>|z+8#0000000&|w|e|i|-+8#0000e05&|d+8#0000000&|r>e|i|-+8#0000e05&|v+8#0000000&|i|e|r|-+8#0000e05&|f+8#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+0#0000000&|n|f|-+0#0000e05&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n|-+0#0000e05&|a+0#0000000&|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&|-+0#0000e05&|u+0#0000000&|n|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z|e|h|n|^+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|I+0#0000e05&|f+0#0000000&|ü|n|f|z|e|h|n| @10||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|3|0|-|3|4| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |l|i|s|t| |c|u|r|s|o|r|l|i|n|e|o|p|t|+|=|n|u|m|b|e|r| |l|i|s|t|c|h|a|r|s|=|s|p|a|c|e|:|-| @25
diff --git a/src/testdir/dumps/Test_Xcursorline_9.dump b/src/testdir/dumps/Test_Xcursorline_9.dump
new file mode 100644
index 000000000..9fe2d55aa
--- /dev/null
+++ b/src/testdir/dumps/Test_Xcursorline_9.dump
@@ -0,0 +1,20 @@
+| +8#4040ff13#ffffff0@1|1| |1+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|a+0#0000000&|r|-+0#0000e05&|e+0#0000000&|i|n|s|<+0#0000e05&|2||+1#0000000&| +0#af5f00255&@1|5| | +8#0000000&@44
+| +0#af5f00255&@3|>+0#4040ff13&|0+0#0000e05&@1|d|>|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|ü+8#0000000&|n|f|-+8#0000e05&|s+8#0000000&|e|c|h|s|-+8#0000e05&|s+8#0000000&>i|e|b|e|n|-+8#0000e05&|a+8#0000000&|c|h||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|t+0#0000000&|-+0#0000e05&|u+0#0000000&|n|-+0#0000e05&|z+0#0000000&|e|h|n|-+0#0000e05&|e+0#0000000&|l|f|-+0#0000e05&|z+0#0000000&|w|ö|f|l|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|d+0#0000000&|r|e|i|z|e|h|n|^+0#0000e05&|I|v+0#0000000&|-+0#0000e05&|i+0#0000000&|e|r|z|e|h|n|^+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|I+0#0000e05&|f+0#0000000&|ü|n|f|z|e|h|n| @10||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|2| |2+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|3| |3+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|4| |4+0#0000000&|-+0#0000e05&|f+0#0000000&|o@7|-+0#0000e05&|b+0#0000000&|a|r|-+0#0000e05&|e+0#0000000&|i|n|s|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|z+0#0000000&|w|e|i|-+0#0000e05&|d+0#0000000&|r|e|i|-+0#0000e05&|v+0#0000000&|i|e|r|-+0#0000e05&|f+0#0000000&|ü|n|f|-+0#0000e05&||+1#0000000&|~+0#4040ff13&| @47
+| +0#af5f00255&@3|>+0#4040ff13&|s+0#0000000&|e|c|h|s|-+0#0000e05&|s+0#0000000&|i|e|b|e|n| @7||+1&&|~+0#4040ff13&| @47
+| +0#af5f00255&@1|5| | +0#0000000&@20||+1&&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|~| @23||+1#0000000&|~+0#4040ff13&| @47
+|<+3#0000000&|o| |N|a|m|e|]| |[|+|]| |1|,|5|1|-|5@1| @1|A|l@1| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @17|5|,|0|-|1| @9|B|o|t
+|:+0&&|s|e|t| |l|i|s|t| |c|u|r|s|o|r|l|i|n|e|o|p|t|+|=|n|u|m|b|e|r| |l|i|s|t|c|h|a|r|s|=|s|p|a|c|e|:|-| @25
diff --git a/src/testdir/dumps/Test_cursorline_yank_01.dump b/src/testdir/dumps/Test_cursorline_yank_01.dump
index 3de1bff03..7b749b1aa 100644
--- a/src/testdir/dumps/Test_cursorline_yank_01.dump
+++ b/src/testdir/dumps/Test_cursorline_yank_01.dump
@@ -1,7 +1,7 @@
| +0#af5f00255#ffffff0@1|3| | +0#0000000&@70
| +0#af5f00255&@1|2| |1+0#0000000&| @69
| +0#af5f00255&@1|1| |2+0#0000000&| @69
-| +0#af5f00255&@1|0| >3+8#0000000&| @69
+| +8#af5f00255&@1|0| >3+8#0000000&| @69
| +0#af5f00255&@1|1| | +0#0000000&@70
|~+0#4040ff13&| @73
|~| @73
diff --git a/src/testdir/dumps/Test_textprop_01.dump b/src/testdir/dumps/Test_textprop_01.dump
index 9d3eb5c19..24ca480dc 100644
--- a/src/testdir/dumps/Test_textprop_01.dump
+++ b/src/testdir/dumps/Test_textprop_01.dump
@@ -1,6 +1,6 @@
| +0#af5f00255#ffffff0@1|1| |O+0#0000000&|n|e| +0&#ffff4012|t|w|o| +0&#ffffff0@63
| +0#af5f00255&@1|2| |N+0#0000000#ffff4012|u|m|b|é|r| |1+0#4040ff13&|2|3| +0#0000000&|ä|n|d| |t|h|œ|n| |4+0#4040ff13&|¾|7|.+0#0000000&| +0&#ffffff0@46
-| +0#af5f00255&@1|3| >-+8#0000000#ffff4012|x+8&#ffffff0|a+8#4040ff13&@1|x+8#0000000&|-@1|x+8#4040ff13&|b@1|x+8#0000000&|-@1|x|c+8#4040ff13&@1|x|-+8#0000000&@1|x+8#4040ff13&|d@1|x|-+8#0000000&@1| @45
+| +8#af5f00255&@1|3| >-+8#0000000#ffff4012|x+8&#ffffff0|a+8#4040ff13&@1|x+8#0000000&|-@1|x+8#4040ff13&|b@1|x+8#0000000&|-@1|x|c+8#4040ff13&@1|x|-+8#0000000&@1|x+8#4040ff13&|d@1|x|-+8#0000000&@1| @45
| +0#af5f00255&@1|4| |/+0#40ff4011&@1| |c|o|m@1|e|n|t| |w+0&#e0e0e08|i|t|h| |e+8&&|r@1|o|r| +0&#ffffff0|i|n| |i|t| +0#0000000&@43
| +0#af5f00255&@1|5| |f+0#0000000&|i|r|s|t| |l+0&#ffff4012|i|n|e| @1|s|e|c|o|n|d| +0&#ffffff0|l|i|n|e| @1|t|h|i|r|d| |l|i|n|e| |f|o|u|r|t|h| |l+0&#ffff4012|i|n|e| +0&#ffffff0@23
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_wincolor_01.dump b/src/testdir/dumps/Test_wincolor_01.dump
index 0536fd27b..06f45b88d 100644
--- a/src/testdir/dumps/Test_wincolor_01.dump
+++ b/src/testdir/dumps/Test_wincolor_01.dump
@@ -1,6 +1,6 @@
| +0#af5f00255#ffd7ff255@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
| +0#af5f00255&@1|1| |1+0#0000001&@4|1+0#0000000#e0e0e08@4| | +0#0000001#ffd7ff255@59
-| +0#af5f00255&@1|0| |2+0#0000000#e0e0e08@4>2+0#0000001#ffd7ff255@5| +8&&@59
+| +8#af5f00255&@1|0| |2+0#0000000#e0e0e08@4>2+0#0000001#ffd7ff255@5| +8&&@59
| +0#af5f00255&@1|1| |3+0#0000001&| |h|e|r|e+0&#e0e0e08| +0&#ffd7ff255|3| @62
| +0#af5f00255&@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
|~+0#4040ff13&| @73
diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim
index 437ad760c..f70623b0a 100644
--- a/src/testdir/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -82,7 +82,7 @@ let test_values = {
\ 'completeslash': [['', 'slash', 'backslash'], ['xxx']],
\ 'cryptmethod': [['', 'zip'], ['xxx']],
\ 'cscopequickfix': [['', 's-', 's-,c+,e0'], ['xxx', 's,g,d']],
- \ 'cursorlineopt': [['both', 'line', 'number'], ['', 'xxx', 'line,number']],
+ \ 'cursorlineopt': [['both', 'line', 'number', 'screenline', 'line,number'], ['', 'xxx', 'line,screenline']],
\ 'debug': [['', 'msg', 'msg', 'beep'], ['xxx']],
\ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx', 'algorithm:xxx', 'algorithm:']],
\ 'display': [['', 'lastline', 'lastline,uhex'], ['xxx']],
diff --git a/src/testdir/test_cursorline.vim b/src/testdir/test_cursorline.vim
index 46fbd0cd6..49df94f90 100644
--- a/src/testdir/test_cursorline.vim
+++ b/src/testdir/test_cursorline.vim
@@ -1,7 +1,7 @@
" Test for cursorline and cursorlineopt
-"
-source view_util.vim
+
source check.vim
+source screendump.vim
function! s:screen_attr(lnum) abort
return map(range(1, 8), 'screenattr(a:lnum, v:val)')
@@ -106,3 +106,93 @@ func Test_cursorline_highlight2()
exe 'hi' save_hi
endtry
endfunc
+
+func Test_cursorline_screenline()
+ CheckScreendump
+ CheckOption cursorlineopt
+ let filename='Xcursorline'
+ let lines = []
+
+ let file_content =<< trim END
+ 1 foooooooo ar eins‍zwei drei vier fünf sechs sieben acht un zehn elf zwöfl dreizehn v ierzehn fünfzehn
+ 2 foooooooo bar eins zwei drei vier fünf sechs sieben
+ 3 foooooooo bar eins zwei drei vier fünf sechs sieben
+ 4 foooooooo bar eins zwei drei vier fünf sechs sieben
+ END
+ let lines1 =<< trim END1
+ set nocp
+ set display=lastline
+ set cursorlineopt=screenline cursorline nu wrap sbr=>
+ hi CursorLineNr ctermfg=blue
+ 25vsp
+ END1
+ let lines2 =<< trim END2
+ call cursor(1,1)
+ END2
+ call extend(lines, lines1)
+ call extend(lines, ["call append(0, ".. string(file_content).. ')'])
+ call extend(lines, lines2)
+ call writefile(lines, filename)
+ " basic test
+ let buf = RunVimInTerminal('-S '. filename, #{rows: 20})
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_1', {})
+ call term_sendkeys(buf, "fagj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_2', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_3', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_4', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_5', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_6', {})
+ " test with set list and cursorlineopt containing number
+ call term_sendkeys(buf, "gg0")
+ call term_sendkeys(buf, ":set list cursorlineopt+=number listchars=space:-\<cr>")
+ call VerifyScreenDump(buf, 'Test_'. filename. '_7', {})
+ call term_sendkeys(buf, "fagj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_8', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_9', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_10', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_11', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_12', {})
+ if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent")
+ " test with set foldcolumn signcoloumn and breakindent
+ call term_sendkeys(buf, "gg0")
+ call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>")
+ call VerifyScreenDump(buf, 'Test_'. filename. '_13', {})
+ call term_sendkeys(buf, "fagj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_14', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_15', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_16', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_17', {})
+ call term_sendkeys(buf, "gj")
+ call term_wait(buf)
+ call VerifyScreenDump(buf, 'Test_'. filename. '_18', {})
+ endif
+
+ call StopVimInTerminal(buf)
+ call delete(filename)
+endfunc
diff --git a/src/version.c b/src/version.c
index f76dde79f..76476bcf4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2029,
+/**/
2028,
/**/
2027,