Mercurial > vim
comparison src/screen.c @ 17229:f1c7b7a4d9e4 v8.1.1614
patch 8.1.1614: 'numberwidth' can only go up to 10
commit https://github.com/vim/vim/commit/f8a071265535b8cc43e50a81f4d5049883ca50e4
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 1 22:06:07 2019 +0200
patch 8.1.1614: 'numberwidth' can only go up to 10
Problem: 'numberwidth' can only go up to 10.
Solution: Allow up to 20. (Charlie Stanton, closes https://github.com/vim/vim/issues/4584)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 01 Jul 2019 22:15:05 +0200 |
parents | 09fa437d33d8 |
children | cbd0432cf8ff |
comparison
equal
deleted
inserted
replaced
17228:da9a9c4265a1 | 17229:f1c7b7a4d9e4 |
---|---|
3147 int startrow, | 3147 int startrow, |
3148 int endrow, | 3148 int endrow, |
3149 int nochange UNUSED, // not updating for changed text | 3149 int nochange UNUSED, // not updating for changed text |
3150 int number_only) // only update the number column | 3150 int number_only) // only update the number column |
3151 { | 3151 { |
3152 int col = 0; /* visual column on screen */ | 3152 int col = 0; // visual column on screen |
3153 unsigned off; /* offset in ScreenLines/ScreenAttrs */ | 3153 unsigned off; // offset in ScreenLines/ScreenAttrs |
3154 int c = 0; /* init for GCC */ | 3154 int c = 0; // init for GCC |
3155 long vcol = 0; /* virtual column (for tabs) */ | 3155 long vcol = 0; // virtual column (for tabs) |
3156 #ifdef FEAT_LINEBREAK | 3156 #ifdef FEAT_LINEBREAK |
3157 long vcol_sbr = -1; /* virtual column after showbreak */ | 3157 long vcol_sbr = -1; // virtual column after showbreak |
3158 #endif | 3158 #endif |
3159 long vcol_prev = -1; /* "vcol" of previous character */ | 3159 long vcol_prev = -1; // "vcol" of previous character |
3160 char_u *line; /* current line */ | 3160 char_u *line; // current line |
3161 char_u *ptr; /* current position in "line" */ | 3161 char_u *ptr; // current position in "line" |
3162 int row; /* row in the window, excl w_winrow */ | 3162 int row; // row in the window, excl w_winrow |
3163 int screen_row; /* row on the screen, incl w_winrow */ | 3163 int screen_row; // row on the screen, incl w_winrow |
3164 | 3164 |
3165 char_u extra[20]; /* "%ld" and 'fdc' must fit in here */ | 3165 char_u extra[21]; // "%ld " and 'fdc' must fit in here |
3166 int n_extra = 0; /* number of extra chars */ | 3166 int n_extra = 0; // number of extra chars |
3167 char_u *p_extra = NULL; /* string of extra chars, plus NUL */ | 3167 char_u *p_extra = NULL; // string of extra chars, plus NUL |
3168 char_u *p_extra_free = NULL; /* p_extra needs to be freed */ | 3168 char_u *p_extra_free = NULL; // p_extra needs to be freed |
3169 int c_extra = NUL; /* extra chars, all the same */ | 3169 int c_extra = NUL; // extra chars, all the same |
3170 int c_final = NUL; /* final char, mandatory if set */ | 3170 int c_final = NUL; // final char, mandatory if set |
3171 int extra_attr = 0; /* attributes when n_extra != 0 */ | 3171 int extra_attr = 0; // attributes when n_extra != 0 |
3172 static char_u *at_end_str = (char_u *)""; /* used for p_extra when | 3172 static char_u *at_end_str = (char_u *)""; // used for p_extra when |
3173 displaying lcs_eol at end-of-line */ | 3173 // displaying lcs_eol at end-of-line |
3174 int lcs_eol_one = lcs_eol; /* lcs_eol until it's been used */ | 3174 int lcs_eol_one = lcs_eol; // lcs_eol until it's been used |
3175 int lcs_prec_todo = lcs_prec; /* lcs_prec until it's been used */ | 3175 int lcs_prec_todo = lcs_prec; // lcs_prec until it's been used |
3176 | 3176 |
3177 /* saved "extra" items for when draw_state becomes WL_LINE (again) */ | 3177 // saved "extra" items for when draw_state becomes WL_LINE (again) |
3178 int saved_n_extra = 0; | 3178 int saved_n_extra = 0; |
3179 char_u *saved_p_extra = NULL; | 3179 char_u *saved_p_extra = NULL; |
3180 int saved_c_extra = 0; | 3180 int saved_c_extra = 0; |
3181 int saved_c_final = 0; | 3181 int saved_c_final = 0; |
3182 int saved_char_attr = 0; | 3182 int saved_char_attr = 0; |