]> granicus.if.org Git - nethack/commitdiff
cancelling compound option change
authorcohrs <cohrs>
Mon, 26 Aug 2002 15:23:06 +0000 (15:23 +0000)
committercohrs <cohrs>
Mon, 26 Aug 2002 15:23:06 +0000 (15:23 +0000)
Patch from <Someone>.  Accept escape when setting complex option as a cancel,
like most other prompts.

src/options.c

index 8043db7afee2e4b860f4447ae90df1a5c4f79d97..c99ce0e1a47814a05ae45b4cbc3d7dbc17d7a34b 100644 (file)
@@ -2383,6 +2383,8 @@ doset()
                                                        setinitial, fromfile)) {
                        Sprintf(buf, "Set %s to what?", compopt[opt_indx].name);
                        getlin(buf, buf2);
+                       if (buf2[0] == '\033')
+                           continue;
                        Sprintf(buf, "%s:%s", compopt[opt_indx].name, buf2);
                        /* pass the buck */
                        parseoptions(buf, setinitial, fromfile);