comparison src/screen.c @ 3984:cd59ba19985a v7.3.747

updated for version 7.3.747 Problem: When characters are concealed text aligned with tabs are no longer aligned, e.g. at ":help :index". Solution: Compensate space for tabs for concealed characters. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Wed, 05 Dec 2012 15:32:30 +0100
parents 8115f449a574
children 56bb88c68f98
comparison
equal deleted inserted replaced
3983:78f94fab8bf4 3984:cd59ba19985a
4267 */ 4267 */
4268 if (c == TAB && (!wp->w_p_list || lcs_tab1)) 4268 if (c == TAB && (!wp->w_p_list || lcs_tab1))
4269 { 4269 {
4270 /* tab amount depends on current column */ 4270 /* tab amount depends on current column */
4271 n_extra = (int)wp->w_buffer->b_p_ts 4271 n_extra = (int)wp->w_buffer->b_p_ts
4272 - VCOL_HLC % (int)wp->w_buffer->b_p_ts - 1; 4272 - vcol % (int)wp->w_buffer->b_p_ts - 1;
4273 #ifdef FEAT_CONCEAL
4274 /* Tab alignment should be identical regardless of
4275 * 'conceallevel' value. So tab compensates of all
4276 * previous concealed characters, and thus resets vcol_off
4277 * and boguscols accumulated so far in the line. Note that
4278 * the tab can be longer than 'tabstop' when there
4279 * are concealed characters. */
4280 n_extra += vcol_off;
4281 vcol -= vcol_off;
4282 vcol_off = 0;
4283 col -= boguscols;
4284 boguscols = 0;
4285 #endif
4273 #ifdef FEAT_MBYTE 4286 #ifdef FEAT_MBYTE
4274 mb_utf8 = FALSE; /* don't draw as UTF-8 */ 4287 mb_utf8 = FALSE; /* don't draw as UTF-8 */
4275 #endif 4288 #endif
4276 if (wp->w_p_list) 4289 if (wp->w_p_list)
4277 { 4290 {