mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-patch:9.0.0207: stacktrace not shown when debugging (#19776)
Problem: Stacktrace not shown when debugging.
Solution: Set msg_scroll in msg_source(). (closes vim/vim#10917)
28c162f6f1
This commit is contained in:
@@ -606,6 +606,7 @@ void msg_source(int attr)
|
|||||||
}
|
}
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
|
||||||
|
msg_scroll = true; // this will take more than one line
|
||||||
no_wait_return++;
|
no_wait_return++;
|
||||||
char *p = get_emsg_source();
|
char *p = get_emsg_source();
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
@@ -739,7 +740,6 @@ static bool emsg_multiline(const char *s, bool multiline)
|
|||||||
}
|
}
|
||||||
|
|
||||||
emsg_on_display = true; // remember there is an error message
|
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
|
attr = HL_ATTR(HLF_E); // set highlight mode for error messages
|
||||||
if (msg_scrolled != 0) {
|
if (msg_scrolled != 0) {
|
||||||
need_wait_return = true; // needed in case emsg() is called after
|
need_wait_return = true; // needed in case emsg() is called after
|
||||||
@@ -750,9 +750,8 @@ static bool emsg_multiline(const char *s, bool multiline)
|
|||||||
msg_ext_set_kind("emsg");
|
msg_ext_set_kind("emsg");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Display name and line number for the source of the error.
|
||||||
* Display name and line number for the source of the error.
|
// Sets "msg_scroll".
|
||||||
*/
|
|
||||||
msg_source(attr);
|
msg_source(attr);
|
||||||
|
|
||||||
// Display the error message itself.
|
// Display the error message itself.
|
||||||
|
@@ -820,11 +820,16 @@ func Test_rightleftcmd()
|
|||||||
set rightleft&
|
set rightleft&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for the "debug" option
|
" Test for the 'debug' option
|
||||||
func Test_debug_option()
|
func Test_debug_option()
|
||||||
|
" redraw to avoid matching previous messages
|
||||||
|
redraw
|
||||||
set debug=beep
|
set debug=beep
|
||||||
exe "normal \<C-c>"
|
exe "normal \<C-c>"
|
||||||
call assert_equal('Beep!', Screenline(&lines))
|
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&
|
set debug&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user