Browse Source

edit/edit.c (edit_execute_cmd): Reload syntax on toggle to on.

Leonard den Ottolander 19 years ago
parent
commit
2157716489
2 changed files with 6 additions and 1 deletions
  1. 4 0
      edit/ChangeLog
  2. 2 1
      edit/edit.c

+ 4 - 0
edit/ChangeLog

@@ -1,3 +1,7 @@
+2006-02-02  Leonard den Ottolander  <leonard den ottolander nl>
+
+	* edit.c (edit_execute_cmd): Reload syntax on toggle to on.
+
 2006-02-01  Andy Shevchenko  <andy@pylesos.interdon.net>
 
 	* edit.c, editcmddef.h, editkeys.c: Add Ctrl-S to toggle syntax

+ 2 - 1
edit/edit.c

@@ -2480,7 +2480,8 @@ edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
 	break;
 
     case CK_Toggle_Syntax:
-	option_syntax_highlighting ^= 1;
+	if ((option_syntax_highlighting ^= 1) == 1)
+	    edit_load_syntax (edit, NULL, option_syntax_type);
 	edit->force |= REDRAW_PAGE;
 	break;