# HG changeset patch # User Bram Moolenaar # Date 1360149288 -3600 # Node ID 5e9730de25e9b4fc2abe14b8d6b0968a9e59983a # Parent 30b3b1da035000ba1fe36cb57c3ca2e5111e8ca1 updated for version 7.3.799 Problem: The color column is not correct when entering a buffer. (Ben Fritz) Solution: Call check_colorcolumn() if 'textwidth' changed. (Christian Brabandt) diff --git a/src/buffer.c b/src/buffer.c --- a/src/buffer.c +++ b/src/buffer.c @@ -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. */ diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -726,6 +726,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 799, +/**/ 798, /**/ 797,