action: add "Close" to close top-most view

This commit is contained in:
Johan Malm 2021-07-12 21:46:10 +01:00
parent 9fa783e7b4
commit eaed1a3cab
4 changed files with 9 additions and 2 deletions

View file

@ -23,7 +23,10 @@ action(struct server *server, const char *action, const char *command)
{
if (!action)
return;
if (!strcasecmp(action, "Debug")) {
if (!strcasecmp(action, "Close")) {
struct view *view = topmost_mapped_view(server);
view->impl->close(view);
} else if (!strcasecmp(action, "Debug")) {
/* nothing */
} else if (!strcasecmp(action, "Execute")) {
struct buf cmd;