Re: [bugs] Allow using :x instead of :wq

On 10/21/18 2:23 PM, Lukas Fleischer wrote:
I cannot apply your patch using git-am(1). Did you try
that? Will have a closer look tomorrow.

Lukas,

This is my first time making a patch with git, sorry about that.

I too had trouble applying it with git-am; I tried redoing the git format-patch and the attached patch seems to work now (but I'm not quite sure why that is the case...).

- Sub
From 6c85d3a17ff26cfbf1952bbd6f5687546579dbd7 Mon Sep 17 00:00:00 2001
From: Subramaniyam Raizada <sub@xxxxxxxxxxxxxx>
Date: Sun, 21 Oct 2018 01:17:17 -0400
Subject: [PATCH 1/2] allow using :x instead of :wq

---
 src/calcurse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/calcurse.c b/src/calcurse.c
index 8e1978e..7c3ff4f 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -489,12 +489,12 @@ static inline void key_generic_cmd(void)
 	}
 
 	if (!strcmp(cmd_name, "write") || !strcmp(cmd_name, "w") ||
-	    !strcmp(cmd_name, "wq")) {
+	    !strcmp(cmd_name, "wq")    || !strcmp(cmd_name, "x")) {
 		io_save_cal(IO_SAVE_DISPLAY_BAR);
 		valid = 1;
 	}
 	if (!strcmp(cmd_name, "quit") || !strcmp(cmd_name, "q") ||
-	    !strcmp(cmd_name, "wq")) {
+	    !strcmp(cmd_name, "wq")   || !strcmp(cmd_name, "x")) {
 		if (force || !conf.confirm_quit || status_ask_bool(
 				_("Do you really want to quit?")) == 1)
 			exit_calcurse(EXIT_SUCCESS);
-- 
2.19.1

Links