Ticket #2035: added "Toggle syntax highlighting" menu item.

Added "Toggle syntax highlighting" menu item.
Described C-s shortcut in mcedit man page.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-07-07 13:50:03 +04:00
parent f757e8756f
commit c8bd032113
3 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -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));