summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-12-02 09:52:49 +1100
committerMaxime Coste <mawww@kakoune.org>2018-12-02 09:52:49 +1100
commit5f315e68b6b5b9484da244df0ca14aa2fb9c109f (patch)
tree6525ea8be37baeb4a28454b2ad41ee0f3a1081d3 /src
parent17ebc582b6dabe736d82df85cd51ef4428d2f681 (diff)
parentf0e07cc73c41db9afcd33f449f85e2fad097d8d2 (diff)
Merge remote-tracking branch 'lenormf/fix-prompt-on-change'
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc
index c9822dda..cf9639fa 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -1908,7 +1908,17 @@ const CommandDesc prompt_cmd = {
case PromptEvent::Change: cmd = on_change; break;
case PromptEvent::Abort: cmd = on_abort; break;
}
- CommandManager::instance().execute(cmd, context, sc);
+ try
+ {
+ CommandManager::instance().execute(cmd, context, sc);
+ }
+ catch (Kakoune::runtime_error& error)
+ {
+ context.print_status({ fix_atom_text(error.what().str()),
+ context.faces()["Error"] });
+ context.hooks().run_hook(Hook::RuntimeError, error.what(),
+ context);
+ }
});
}
};