]> granicus.if.org Git - vim/commitdiff
patch 9.0.0681: "<<<" shows for 'smoothscroll' even when 'showbreak is set v9.0.0681
authorBram Moolenaar <Bram@vim.org>
Thu, 6 Oct 2022 20:24:34 +0000 (21:24 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 6 Oct 2022 20:24:34 +0000 (21:24 +0100)
Problem:    "<<<" shows for 'smoothscroll' even when 'showbreak is set.
Solution:   When 'showbreak' is set do not display "<<<".

src/drawline.c
src/testdir/test_breakindent.vim
src/testdir/test_listlbr_utf8.vim
src/version.c

index f738e76b4e6539094ca334f1072d5623be986e39..e7f9fabab10a2a0a779a073db27d5049e47a7e49 100644 (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);
 
index 289dc08bf34c472105647dd0d55d6ae98eaf236c..ad6516fb612ed6901f8582b1a886d9128c58c231 100644 (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",
        \ ]
index 83d6ed0c7ff222f1d8e695e38b326ebc7621b495..ec54209180c835917c266ab1d7de5d3c806efdc1 100644 (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      ",
index 346894dd6a42066e4b155d704f5b85fa8c7fd22c..bd93ff703cf33a444128b232fafc6b9fdb22d899 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    681,
 /**/
     680,
 /**/