diff options
-rw-r--r-- | src/nvim/message.c | 2 | ||||
-rw-r--r-- | test/functional/ui/screen_basic_spec.lua | 40 |
2 files changed, 41 insertions, 1 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index ac731210d7..e21981ec90 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -227,7 +227,7 @@ void msg_multiline_attr(const char *s, int attr) { const char *next_spec = s; - while (next_spec != NULL) { + while (next_spec != NULL && !got_int) { next_spec = strpbrk(s, "\t\n\r"); if (next_spec != NULL) { diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 46f0b5060c..f6faed747c 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -951,6 +951,46 @@ local function screen_tests(linegrid) | ]]) end) + + describe('more prompt', function() + it('can be quit', function() + command("set more") + feed(':echon join(map(range(0, &lines*2), "v:val"), "\\n")<cr>') + screen:expect{grid=[[ + 0 | + 1 | + 2 | + 3 | + 4 | + 5 | + 6 | + 7 | + 8 | + 9 | + 10 | + 11 | + 12 | + {7:-- More --}^ | + ]]} + feed('q') + screen:expect{grid=[[ + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + | + ]]} + end) + end) end describe("Screen (char-based)", function() |