Skip to content

Instantly share code, notes, and snippets.

@akkartik
Last active December 20, 2016 17:50
Show Gist options
  • Save akkartik/a1a0c9331c401af0439af29d2f492fd7 to your computer and use it in GitHub Desktop.
Save akkartik/a1a0c9331c401af0439af29d2f492fd7 to your computer and use it in GitHub Desktop.
cleaner shutdown for kakoune
diff --git a/src/main.cc b/src/main.cc
index 1af5493..c9a17c8 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -466,7 +466,8 @@ int run_client(StringView session, StringView init_cmds, UIType ui_type)
}
catch (disconnected& e)
{
- write_stderr(format("{}\ndisconnecting\n", e.what()));
+ if (!e.m_graceful)
+ write_stderr(format("{}\ndisconnecting\n", e.what()));
return e.m_graceful ? 0 : -1;
}
return 0;
$ kak -c main src/main.cc
# lots of editing here
# on exit:
peer disconnected
disconnecting
$
$ kak -c main src/main.cc
# lots of editing here
# on clean exit, silence!
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment