summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-12-05 14:01:07 +0000
committerMaxime Coste <frrrwww@gmail.com>2014-12-05 14:01:07 +0000
commitd57be835220b35e3a4630d0e79f027ef7b2bd545 (patch)
tree86388ed1fcd8682b6d5fe45237de2a62a73e9106 /src/input_handler.cc
parent1c5975835e7ea13f37e56a66182448b192be4683 (diff)
Disable history writing when running hooks
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc6
1 files changed, 4 insertions, 2 deletions
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();