fix highlight tab and spaces in mark procces.

This commit is contained in:
Ilia Maslakov 2009-05-12 10:06:37 +00:00
parent 25d5ed8c6a
commit 7fbff4fa86

View File

@ -398,38 +398,38 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
i = TAB_SIZE - ((int) col % TAB_SIZE); i = TAB_SIZE - ((int) col % TAB_SIZE);
col += i; col += i;
if (use_colors && visible_tabs) { if (use_colors && visible_tabs) {
c = 0; c = (p->style & ~MOD_CURSOR) | MOD_WHITESPACE;
if (i > 2) { if (i > 2) {
p->ch |= '<'; p->ch = '<';
p->style = MOD_WHITESPACE; p->style |= MOD_WHITESPACE;
p++; p++;
while (--i > 1) { while (--i > 1) {
p->ch = c | '-'; p->ch = '-';
p->style = MOD_WHITESPACE; p->style = c;
p++; p++;
} }
p->ch = c | '>'; p->ch = '>';
p->style = MOD_WHITESPACE; p->style = c;
p++; p++;
} else if (i > 1) { } else if (i > 1) {
p->ch |= '<'; p->ch = '<';
p->style = MOD_WHITESPACE; p->style |= MOD_WHITESPACE;
p++; p++;
p->ch = c | '>'; p->ch = '>';
p->style = MOD_WHITESPACE; p->style = c;
p++; p++;
} else { } else {
p->ch |= '>'; p->ch = '>';
p->style = MOD_WHITESPACE; p->style |= MOD_WHITESPACE;
p++; p++;
} }
} else if (use_colors && visible_tws && q >= tws) { } else if (use_colors && visible_tws && q >= tws) {
p->ch |= '.'; p->ch = '.';
p->style = MOD_WHITESPACE; p->style |= MOD_WHITESPACE;
c = p->style & ~MOD_CURSOR; c = p->style & ~MOD_CURSOR;
p++; p++;
while (--i) { while (--i) {
p->ch = ' '; p->ch = ' ';
p->style = c; p->style = c;
p++; p++;
} }
@ -438,7 +438,7 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
c = p->style & ~MOD_CURSOR; c = p->style & ~MOD_CURSOR;
p++; p++;
while (--i) { while (--i) {
p->ch = ' '; p->ch = ' ';
p->style = c; p->style = c;
p++; p++;
} }
@ -446,8 +446,8 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
break; break;
case ' ': case ' ':
if (use_colors && visible_tws && q >= tws) { if (use_colors && visible_tws && q >= tws) {
p->ch |= '.'; p->ch = '.';
p->style = MOD_WHITESPACE; p->style |= MOD_WHITESPACE;
p++; p++;
col++; col++;
break; break;