Skip to content

Commit

Permalink
Merge pull request #423 from shrizza/quit-command
Browse files Browse the repository at this point in the history
Add '/quit' command
  • Loading branch information
assertivist authored Nov 10, 2024
2 parents 0dbf648 + b7ca2cd commit 5245c2b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tui/CommandManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#include "Tags.h"
#include "GitVersion.h"

#include <nanogui/nanogui.h>

using namespace nanogui;

CommandManager::CommandManager(CAvaraAppImpl *theApp) : itsApp(theApp) {

// register commands
Expand Down Expand Up @@ -118,6 +122,14 @@ CommandManager::CommandManager(CAvaraAppImpl *theApp) : itsApp(theApp) {
return false;
});
TextCommand::Register(cmd);

cmd = new TextCommand("/quit <- quit",
[this](VectorOfArgs vargs) -> bool {
itsApp->Done();
leave();
return false;
});
TextCommand::Register(cmd);
}


Expand Down

0 comments on commit 5245c2b

Please sign in to comment.