1
0
forked from aniani/vim

patch 9.0.0681: "<<<" shows for 'smoothscroll' even when 'showbreak is set

Problem:    "<<<" shows for 'smoothscroll' even when 'showbreak is set.
Solution:   When 'showbreak' is set do not display "<<<".
This commit is contained in:
Bram Moolenaar
2022-10-06 21:24:34 +01:00
parent 3725116f6e
commit 0937b9fb24
4 changed files with 11 additions and 4 deletions

View File

@@ -745,12 +745,17 @@ text_prop_position(
/*
* Call screen_line() using values from "wlv".
* Also takes care of putting "<<<" on the first line for 'smoothscroll'.
* Also takes care of putting "<<<" on the first line for 'smoothscroll'
* when 'showbreak' is not set.
*/
static void
wlv_screen_line(win_T *wp, winlinevars_T *wlv, int negative_width)
{
if (wlv->row == 0 && wp->w_skipcol > 0)
if (wlv->row == 0 && wp->w_skipcol > 0
#if defined(FEAT_LINEBREAK)
&& *get_showbreak_value(wp) == NUL
#endif
)
{
int off = (int)(current_ScreenLine - ScreenLines);

View File

@@ -660,7 +660,7 @@ func Test_breakindent19_sbr_nextpage()
norm! 5gj
let lines = s:screen_lines(1, 20)
let expect = [
\ "<<<aaaaaaaaaaaaaaaaa",
\ ">aaaaaaaaaaaaaaaaaaa",
\ ">aaaaaaaaaaaaaaaaaaa",
\ ">aaaaaaaaaaaaaaaaaaa",
\ ]

View File

@@ -167,7 +167,7 @@ func Test_visual_block_and_selection_exclusive()
exe "norm! $3B\<C-v>eAx\<Esc>"
let lines = s:screen_lines([1, 10], winwidth(0))
let expect = [
\ "<<<obar foobar ",
\ "+foobar foobar ",
\ "+foobar foobar ",
\ "+foobar foobar ",
\ "+foobar foobar ",

View File

@@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
681,
/**/
680,
/**/