From 01e51f549684bb570abc7fc8b04e647d03e140cd Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 15 Jan 2012 12:48:44 +0300 Subject: [PATCH] Editor: avoid extra screen redraw. Signed-off-by: Andrew Borodin --- src/editor/editcmd.c | 2 +- src/editor/editwidget.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index b3d304f09..ccbeb01a3 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -1622,7 +1622,7 @@ edit_execute_macro (WEdit * edit, int hotkey) } } } - edit_update_screen (edit); + return res; } diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index 8a0f62858..2314ba11f 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -322,7 +322,10 @@ edit_callback (Widget * w, widget_msg_t msg, int parm) /* The user may override the access-keys for the menu bar. */ if (macro_index == -1 && edit_execute_macro (e, parm)) + { + edit_update_screen (e); ret = MSG_HANDLED; + } else if (edit_translate_key (e, parm, &cmd, &ch)) { edit_execute_key_command (e, cmd, ch);