diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-14 14:49:50 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-14 14:49:50 +0100 |
commit | 28c162f6f1f525882a9a60f10ab4836dee7eb59f (patch) | |
tree | 3467ccd578d063cbab7438720fa8c9241d67e820 /src | |
parent | a4d158b3c839e96ed98ff87c7b7124ff4518c4ff (diff) |
patch 9.0.0207: stacktrace not shown when debuggingv9.0.0207
Problem: Stacktrace not shown when debugging.
Solution: Set msg_scroll in msg_source(). (closes #10917)
Diffstat (limited to 'src')
-rw-r--r-- | src/message.c | 3 | ||||
-rw-r--r-- | src/testdir/test_options.vim | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/message.c b/src/message.c index 715c7beb5a..ec128bd425 100644 --- a/src/message.c +++ b/src/message.c @@ -531,6 +531,7 @@ msg_source(int attr) return; recursive = TRUE; + msg_scroll = TRUE; // this will take more than one line ++no_wait_return; p = get_emsg_source(); if (p != NULL) @@ -746,7 +747,6 @@ emsg_core(char_u *s) } emsg_on_display = TRUE; // remember there is an error message - ++msg_scroll; // don't overwrite a previous message attr = HL_ATTR(HLF_E); // set highlight mode for error messages if (msg_scrolled != 0) need_wait_return = TRUE; // needed in case emsg() is called after @@ -759,6 +759,7 @@ emsg_core(char_u *s) #endif /* * Display name and line number for the source of the error. + * Sets "msg_scroll". */ msg_source(attr); diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index ba08dd7968..e303212793 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -934,11 +934,16 @@ func Test_rightleftcmd() set rightleft& endfunc -" Test for the "debug" option +" Test for the 'debug' option func Test_debug_option() + " redraw to avoid matching previous messages + redraw set debug=beep exe "normal \<C-c>" call assert_equal('Beep!', Screenline(&lines)) + call assert_equal('line 4:', Screenline(&lines - 1)) + " only match the final colon in the line that shows the source + call assert_match(':$', Screenline(&lines - 2)) set debug& endfunc diff --git a/src/version.c b/src/version.c index e13374f9aa..1ef5b39e97 100644 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 207, +/**/ 206, /**/ 205, |