1
0
forked from aniani/vim

patch 9.1.0878: termdebug: cannot enable DEBUG mode

Problem:  termdebug: cannot enable DEBUG mode
Solution: Allow to specify DEBUG mode (Ubaldo Tiberi)

closes: #16080

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Ubaldo Tiberi
2024-11-19 22:32:30 +01:00
committed by Christian Brabandt
parent b5c1557323
commit ae1c8b790b
5 changed files with 52 additions and 3 deletions

View File

@@ -57,6 +57,8 @@ endfunction
packadd termdebug
" should be the first test to run, since it validates the window layout with
" win ids
func Test_termdebug_basic()
let bin_name = 'XTD_basic'
let src_name = bin_name .. '.c'
@@ -620,4 +622,22 @@ function Test_termdebug_config_types()
unlet g:termdebug_config
endfunction
function Test_termdebug_config_debug()
let s:error_message = '\[termdebug\] Termdebug already loaded'
" USER mode: No error message shall be displayed
packadd termdebug
call assert_true(execute('messages') !~ s:error_message)
" DEBUG mode: Error message shall now be displayed
let g:termdebug_config = {}
let g:termdebug_config['debug'] = 1
packadd termdebug
call assert_true(execute('messages') =~ s:error_message)
unlet g:termdebug_config
unlet g:termdebug_loaded
" Revert DEBUG mode, by reloading the plugin
source $VIMRUNTIME/pack/dist/opt/termdebug/plugin/termdebug.vim
endfunction
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
878,
/**/
877,
/**/