comparison src/screen.c @ 17247:cbd0432cf8ff v8.1.1623

patch 8.1.1623: display wrong with signs in narrow number column commit https://github.com/vim/vim/commit/e4b407f536ba8bd007152649a347a95320d80fce Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 4 11:59:28 2019 +0200 patch 8.1.1623: display wrong with signs in narrow number column Problem: Display wrong with signs in narrow number column. Solution: Increase the numbercolumn width if needed. (Yegappan Lakshmanan, closes #4606)
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Jul 2019 12:00:09 +0200
parents f1c7b7a4d9e4
children 82b5d981fe59
comparison
equal deleted inserted replaced
17246:a437ebad37b8 17247:cbd0432cf8ff
11331 11331
11332 /* 'numberwidth' gives the minimal width plus one */ 11332 /* 'numberwidth' gives the minimal width plus one */
11333 if (n < wp->w_p_nuw - 1) 11333 if (n < wp->w_p_nuw - 1)
11334 n = wp->w_p_nuw - 1; 11334 n = wp->w_p_nuw - 1;
11335 11335
11336 # ifdef FEAT_SIGNS
11337 // If 'signcolumn' is set to 'number' and there is a sign to display, then
11338 // the minimal width for the number column is 2.
11339 if (n < 2 && (wp->w_buffer->b_signlist != NULL)
11340 && (*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u'))
11341 n = 2;
11342 # endif
11343
11336 wp->w_nrwidth_width = n; 11344 wp->w_nrwidth_width = n;
11337 wp->w_nuw_cached = wp->w_p_nuw; 11345 wp->w_nuw_cached = wp->w_p_nuw;
11338 return n; 11346 return n;
11339 } 11347 }
11340 #endif 11348 #endif