Last active
December 20, 2016 17:50
-
-
Save akkartik/a1a0c9331c401af0439af29d2f492fd7 to your computer and use it in GitHub Desktop.
cleaner shutdown for kakoune
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kak -c main src/main.cc | |
# lots of editing here | |
# on exit: | |
peer disconnected | |
disconnecting | |
$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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