From 21577164898c194541e9ff91fb3f6a9fdc1e94e7 Mon Sep 17 00:00:00 2001 From: Leonard den Ottolander Date: Thu, 2 Feb 2006 19:45:49 +0000 Subject: [PATCH] edit/edit.c (edit_execute_cmd): Reload syntax on toggle to on. --- edit/ChangeLog | 4 ++++ edit/edit.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/edit/ChangeLog b/edit/ChangeLog index bbefa339e..8be1901da 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,3 +1,7 @@ +2006-02-02 Leonard den Ottolander + + * edit.c (edit_execute_cmd): Reload syntax on toggle to on. + 2006-02-01 Andy Shevchenko * edit.c, editcmddef.h, editkeys.c: Add Ctrl-S to toggle syntax diff --git a/edit/edit.c b/edit/edit.c index 7deb3481e..9fd544784 100644 --- a/edit/edit.c +++ b/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;