diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-06 21:24:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-06 21:24:34 +0100 |
commit | 0937b9fb244949b7ce9bfcf8398d7495b9b6aa85 (patch) | |
tree | 5788fe9abedf4e1c425b39b26020aae7ad7bd6bb | |
parent | 3725116f6ec3b5c01e456b151a60c0690e04f76c (diff) | |
download | vim-git-0937b9fb244949b7ce9bfcf8398d7495b9b6aa85.tar.gz |
patch 9.0.0681: "<<<" shows for 'smoothscroll' even when 'showbreak is setv9.0.0681
Problem: "<<<" shows for 'smoothscroll' even when 'showbreak is set.
Solution: When 'showbreak' is set do not display "<<<".
-rw-r--r-- | src/drawline.c | 9 | ||||
-rw-r--r-- | src/testdir/test_breakindent.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_listlbr_utf8.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/src/drawline.c b/src/drawline.c index f738e76b4..e7f9fabab 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -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); diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim index 289dc08bf..ad6516fb6 100644 --- a/src/testdir/test_breakindent.vim +++ b/src/testdir/test_breakindent.vim @@ -660,7 +660,7 @@ func Test_breakindent19_sbr_nextpage() norm! 5gj let lines = s:screen_lines(1, 20) let expect = [ - \ "<<<aaaaaaaaaaaaaaaaa", + \ ">aaaaaaaaaaaaaaaaaaa", \ ">aaaaaaaaaaaaaaaaaaa", \ ">aaaaaaaaaaaaaaaaaaa", \ ] diff --git a/src/testdir/test_listlbr_utf8.vim b/src/testdir/test_listlbr_utf8.vim index 83d6ed0c7..ec5420918 100644 --- a/src/testdir/test_listlbr_utf8.vim +++ b/src/testdir/test_listlbr_utf8.vim @@ -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 ", diff --git a/src/version.c b/src/version.c index 346894dd6..bd93ff703 100644 --- a/src/version.c +++ b/src/version.c @@ -700,6 +700,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 681, +/**/ 680, /**/ 679, |