mirror of https://github.com/MidnightCommander/mc
Merge branch '2035_toggle_syntax_highlighting_shortcut'
* 2035_toggle_syntax_highlighting_shortcut: Ticket #2035: added "Toggle syntax highlighting" menu item.
This commit is contained in:
commit
848c2ad577
|
@ -369,6 +369,8 @@ A useful hint is to work with as much as possible with the things you
|
|||
can do rather than try to do things that this implementation cannot deal
|
||||
with. Also remember that the aim of syntax highlighting is to make
|
||||
programming less prone to error, not to make code look pretty.
|
||||
.PP
|
||||
The syntax highlighting can be toggled using Ctrl\-s shortcut.
|
||||
.SH COLORS
|
||||
The default colors may be changed by appending to the
|
||||
.B MC_COLOR_TABLE
|
||||
|
|
|
@ -3469,7 +3469,8 @@ edit_execute_cmd (WEdit * edit, unsigned long command, int char_for_insertion)
|
|||
break;
|
||||
|
||||
case CK_Toggle_Syntax:
|
||||
if ((option_syntax_highlighting ^= 1) == 1)
|
||||
option_syntax_highlighting ^= 1;
|
||||
if (option_syntax_highlighting == 1)
|
||||
edit_load_syntax (edit, NULL, edit->syntax_type);
|
||||
edit->force |= REDRAW_PAGE;
|
||||
break;
|
||||
|
|
|
@ -131,6 +131,8 @@ create_command_menu (void)
|
|||
g_list_append (entries, menu_entry_create (_("&Toggle line state"), CK_Toggle_Line_State));
|
||||
entries =
|
||||
g_list_append (entries, menu_entry_create (_("Go to matching &bracket"), CK_Match_Bracket));
|
||||
entries =
|
||||
g_list_append (entries, menu_entry_create (_("Toggle s&yntax highlighting"), CK_Toggle_Syntax));
|
||||
entries = g_list_append (entries, menu_separator_create ());
|
||||
entries =
|
||||
g_list_append (entries, menu_entry_create (_("&Find declaration"), CK_Find_Definition));
|
||||
|
|
Loading…
Reference in New Issue