Ticket #113: 16004-cedit-eol-mark.diff
File 16004-cedit-eol-mark.diff, 2.7 KB (added by slavazanko, 16 years ago) |
---|
-
mc-4.6.2-pre1
Implement showing an EOL mark. Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> --- edit/edit.c | 4 ++-- edit/edit.h | 1 + edit/editdraw.c | 3 ++- edit/editoptions.c | 12 ++++++++++++ 4 files changed, 17 insertions(+), 3 deletions(-)
old new edit_execute_cmd (WEdit *edit, int comma 2652 2652 break; 2653 2653 2654 2654 case CK_Toggle_Syntax2: 2655 ++option_highlighting;2656 option_highlighting %= 4;2655 option_highlighting = (((option_highlighting & 0x3) + 1) % 4) | 2656 (option_highlighting & ~0x3); 2657 2657 edit->force |= REDRAW_PAGE; 2658 2658 break; 2659 2659 -
mc-4.6.2-pre1
old new typedef enum { 310 310 enum { 311 311 HL_WHITESPACE = 1 << 0, 312 312 HL_TABS = 1 << 1, 313 HL_EOL = 1 << 2, 313 314 }; 314 315 315 316 extern int option_save_mode; -
edit/editdraw.c
old new edit_draw_this_line (WEdit *edit, long b 347 347 switch (c) { 348 348 case '\n': 349 349 col = end_col - edit->start_col + 1; /* quit */ 350 p->ch = ' '; 350 p->ch = (option_highlighting & HL_EOL) ? 0xB6 : ' '; 351 p->style |= MOD_WHITESPACE; 351 352 p++; 352 353 break; 353 354 case '\t': -
edit/editoptions.c
old new void edit_syntax_opt_dialog(void) 68 68 int f_syntax_hl = option_syntax_highlighting; 69 69 int f_tab_hl = option_highlighting & HL_TABS; 70 70 int f_ws_hl = option_highlighting & HL_WHITESPACE; 71 int f_ws_eol = option_highlighting & HL_EOL; 71 72 72 73 int old_syntax_hl = f_syntax_hl; 73 74 … … void edit_syntax_opt_dialog(void) 94 95 .widget_type = quick_checkbox, 95 96 .relative_x = 6, 96 97 .x_divisions = OPT_DLG_W, 98 .relative_y = 7, 99 .y_divisions = OPT_DLG_H, 100 .text = N_("EOL highlighting"), 101 .result = &f_ws_eol, 102 }, 103 { 104 .widget_type = quick_checkbox, 105 .relative_x = 6, 106 .x_divisions = OPT_DLG_W, 97 107 .relative_y = 6, 98 108 .y_divisions = OPT_DLG_H, 99 109 .text = N_("Whitespace highlighting"), … … void edit_syntax_opt_dialog(void) 142 152 option_highlighting |= HL_TABS; 143 153 if (f_ws_hl) 144 154 option_highlighting |= HL_WHITESPACE; 155 if (f_ws_eol) 156 option_highlighting |= HL_EOL; 145 157 } 146 158 #undef OPT_DLG_H 147 159 #undef OPT_DLG_W