]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.422 v7.4.422
authorBram Moolenaar <Bram@vim.org>
Fri, 29 Aug 2014 10:08:43 +0000 (12:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 29 Aug 2014 10:08:43 +0000 (12:08 +0200)
Problem:    When using conceal with linebreak some text is not displayed
            correctly. (GrĂ¼ner Gimpel)
Solution:   Check for conceal mode when using linebreak. (Christian Brabandt)

src/screen.c
src/testdir/test_listlbr.in
src/testdir/test_listlbr.ok
src/version.c

index 4c134f0e6d7044878853975fd9cffc096438b7af..7a9311a453f7ded3ad13a41cc826ed64f2940074 100644 (file)
@@ -4514,6 +4514,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
                        int     i;
                        int     saved_nextra = n_extra;
 
+#ifdef FEAT_CONCEAL
+                       if (is_concealing && vcol_off > 0)
+                           /* there are characters to conceal */
+                           tab_len += vcol_off;
+#endif
                        /* if n_extra > 0, it gives the number of chars, to
                         * use for a tab, else we need to calculate the width
                         * for a tab */
@@ -4539,6 +4544,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
 #endif
                        }
                        p_extra = p_extra_free;
+#ifdef FEAT_CONCEAL
+                       /* n_extra will be increased by FIX_FOX_BOGUSCOLS
+                        * macro below, so need to adjust for that here */
+                       if (is_concealing && vcol_off > 0)
+                           n_extra -= vcol_off;
+#endif
                    }
 #endif
 #ifdef FEAT_CONCEAL
index 0cce4c23a5ccb6fb231da3ca5c163dc55b8aab53..2f28126554357a8a56c98f75466e734fe2945b48 100644 (file)
@@ -46,6 +46,16 @@ STARTTEST
 :redraw!
 :let line=ScreenChar(winwidth(0))
 :call DoRecordScreen()
+:let line="_S_\t bla"
+:$put =line
+:$
+:norm! zt
+:let g:test ="Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated)"
+:set cpo&vim list linebreak conceallevel=2 concealcursor=nv listchars=tab:ab
+:syn match ConcealVar contained /_/ conceal
+:syn match All /.*/ contains=ConcealVar
+:let line=ScreenChar(winwidth(0))
+:call DoRecordScreen()
 :%w! test.out
 :qa!
 ENDTEST
index be323d4dc71fd6e521c96ce4c2a4431a98a261a5..9b8037f4d32ecc6290e502c8a81b3583eac58dd1 100644 (file)
@@ -25,3 +25,10 @@ Test 4: set linebreak with tab and 1 line as long as screen: should break!
 +aaaaaaaaaaaaaaaaaa 
 ~                   
 ~                   
+_S_     bla
+
+Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated)
+Sabbbbbb bla        
+~                   
+~                   
+~                   
index d047c9b8db27fe46334c547f2e2221149a95479a..31d1b34d59357bdcdcada019d0df388c602c24f4 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    422,
 /**/
     421,
 /**/