]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.799 v7.3.799
authorBram Moolenaar <Bram@vim.org>
Wed, 6 Feb 2013 11:14:48 +0000 (12:14 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 6 Feb 2013 11:14:48 +0000 (12:14 +0100)
Problem:    The color column is not correct when entering a buffer. (Ben
            Fritz)
Solution:   Call check_colorcolumn() if 'textwidth' changed. (Christian
            Brabandt)

src/buffer.c
src/version.c

index 7f0c106e1318cbb01987a25339ff937ae44f2b96..f4713a1f790104f198609a82806d43e7100a6326 100644 (file)
@@ -1441,6 +1441,8 @@ set_curbuf(buf, action)
 enter_buffer(buf)
     buf_T      *buf;
 {
+    long old_tw = curbuf->b_p_tw;
+
     /* Copy buffer and window local option values.  Not for a help buffer. */
     buf_copy_options(buf, BCO_ENTER | BCO_NOHELP);
     if (!buf->b_help)
@@ -1464,6 +1466,8 @@ enter_buffer(buf)
 
 #ifdef FEAT_SYN_HL
     curwin->w_s = &(buf->b_s);
+    if (old_tw != buf->b_p_tw)
+       check_colorcolumn(curwin);
 #endif
 
     /* Cursor on first line by default. */
index 2f17d2c4ed93ea0d94bec077eb566f545461c8b1..7689b5601304bd76e98e7281a2c89109246658b6 100644 (file)
@@ -725,6 +725,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    799,
 /**/
     798,
 /**/