From d57be835220b35e3a4630d0e79f027ef7b2bd545 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 5 Dec 2014 14:01:07 +0000 Subject: Disable history writing when running hooks --- src/input_handler.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/input_handler.cc') diff --git a/src/input_handler.cc b/src/input_handler.cc index 9554bf35..23d5eb50 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -516,7 +516,8 @@ public: } else if (key == ctrl('m')) // enter { - history_push(history, line); + if (context().history_support().is_enabled()) + history_push(history, line); context().print_status(DisplayLine{}); if (context().has_ui()) context().ui().menu_hide(); @@ -528,7 +529,8 @@ public: } else if (key == Key::Escape or key == ctrl('c')) { - history_push(history, line); + if (context().history_support().is_enabled()) + history_push(history, line); context().print_status(DisplayLine{}); if (context().has_ui()) context().ui().menu_hide(); -- cgit v1.2.3