~sircmpwn/gmni-devel

gmnlm: output newline when quiting via Control-D v1 PROPOSED

Ondřej Fiala: 1
 gmnlm: output newline when quiting via Control-D

 1 files changed, 1 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/gmni-devel/patches/28092/mbox | git am -3
Learn more about email & git

[PATCH] gmnlm: output newline when quiting via Control-D Export this patch

It is common practice to quit programs reading from stdin by sending
EOF to their input. This commit ensures such an exit is functionally
equivalent to a regular exit via the 'q' command.
---
When quiting via Control-D rather than the 'q' command, the shell prompt
gets mixed with the gmnlm one.

 src/gmnlm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index b30d602..6b0016c 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -1241,6 +1241,7 @@ main(int argc, char *argv[])
			case PROMPT_MORE:
				assert(0);
			case PROMPT_QUIT:
				fputc('\n', browser.tty);
				browser.running = false;
				break;
			case PROMPT_ANSWERED:
-- 
2.34.1