summaryrefslogtreecommitdiff
path: root/src/command_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-01-29 13:56:05 +0000
committerMaxime Coste <mawww@kakoune.org>2017-01-29 13:56:05 +0000
commit2052b225d9438328b27acee35a54e3ce1a5ec43e (patch)
tree602414581d9839e3764748332165c41b2a90654f /src/command_manager.hh
parent753f3a50d10e43134ebeb52b3ec0a10b7ec2b80a (diff)
Detect too deep command call stack
Fixes #1163
Diffstat (limited to 'src/command_manager.hh')
-rw-r--r--src/command_manager.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command_manager.hh b/src/command_manager.hh
index 55d62921..7ef10f2c 100644
--- a/src/command_manager.hh
+++ b/src/command_manager.hh
@@ -112,7 +112,7 @@ private:
void execute_single_command(CommandParameters params,
Context& context,
const ShellContext& shell_context,
- DisplayCoord pos) const;
+ DisplayCoord pos);
struct CommandDescriptor
{
@@ -126,6 +126,7 @@ private:
using CommandMap = UnorderedMap<String, CommandDescriptor, MemoryDomain::Commands>;
CommandMap m_commands;
String m_last_complete_command;
+ int m_command_depth = 0;
CommandMap::const_iterator find_command(const Context& context,
const String& name) const;