]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Return immediately when quit is seen
authorAnya <anya@neverten.org>
Tue, 21 Dec 2021 14:26:28 +0000 (14:26 +0000)
committerGitHub <noreply@github.com>
Tue, 21 Dec 2021 14:26:28 +0000 (14:26 +0000)
When a quit character is seen, immediately return that command, as it is the correct operation to perform in this case.

A bigger fix is needed here, in that we need to have a *queue* of operations to perform, rather than a single one

text-utils/more.c

index 74602216300ad713ba9a1f122781a464e2e89619..f1f6d38f78d8ceacb44ad9436e08c4917244c30e 100644 (file)
@@ -894,6 +894,7 @@ static struct number_command read_command(struct more_control *ctl)
                case 'q':
                case 'Q':
                        cmd.key = more_kc_quit;
+                       return cmd;
                        break;
                case 'f':
                case CTRL('F'):