parent 78019b896ba0e59ba886ecf500747cbe77dbc7cb (4.7.5-189-g78019b8)
commit 184c812af135a66c5e60ed09741bf1fecfe01666
Author: Jan Engelhardt <jengelh@medozas.de>
Date: Thu Mar 31 02:52:16 2011 +0200
mcedit: use Office/Word-style tab markers
Less clutter on screen.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
src/editor/editdraw.c | 33 +++++----------------------------
1 files changed, 5 insertions(+), 28 deletions(-)
diff --git a/src/editor/editdraw.c b/src/editor/editdraw.c
index 7fbb294..679846e 100644
a
|
b
|
edit_draw_this_line (WEdit * edit, long b, long row, long start_col, long end_co |
426 | 426 | if (tty_use_colors () && |
427 | 427 | ((visible_tabs || (visible_tws && q >= tws)) && enable_show_tabs_tws)) |
428 | 428 | { |
| 429 | int m = (i - 1) / 2; |
429 | 430 | if (p->style & MOD_MARKED) |
430 | 431 | c = p->style; |
431 | 432 | else if (book_mark) |
432 | 433 | c |= book_mark << 16; |
433 | 434 | else |
434 | 435 | c = p->style | MOD_WHITESPACE; |
435 | | if (i > 2) |
436 | | { |
437 | | p->ch = '<'; |
| 436 | while (i > 0) { |
| 437 | --i; |
438 | 438 | p->style = c; |
439 | | p++; |
440 | | while (--i > 1) |
441 | | { |
442 | | p->ch = '-'; |
443 | | p->style = c; |
444 | | p++; |
445 | | } |
446 | | p->ch = '>'; |
447 | | p->style = c; |
448 | | p++; |
449 | | } |
450 | | else if (i > 1) |
451 | | { |
452 | | p->ch = '<'; |
453 | | p->style = c; |
454 | | p++; |
455 | | p->ch = '>'; |
456 | | p->style = c; |
457 | | p++; |
458 | | } |
459 | | else |
460 | | { |
461 | | p->ch = '>'; |
462 | | p->style = c; |
463 | | p++; |
| 439 | p->ch = (i != m) ? ' ' : 0x2192; |
| 440 | ++p; |
464 | 441 | } |
465 | 442 | } |
466 | 443 | else if (tty_use_colors () && visible_tws && q >= tws && enable_show_tabs_tws) |