runtime(termdebug): Remove load guard
Commit:
https://github.com/vim/vim/commit/fdd93e0999034ac9263ce329b7043cf5657fe1e5
Author: Yegappan Lakshmanan <[email protected]>
Date: Sun Aug 24 12:19:20 2025 +0200
runtime(termdebug): Remove load guard
closes: https://github.com/vim/vim/issues/18098
Signed-off-by: Yegappan Lakshmanan <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 40fb952f7..e96ec749b 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -4,7 +4,7 @@ vim9script
# Author: Bram Moolenaar
# Copyright: Vim license applies, see ":help license"
-# Last Change: 2025 Jul 08
+# Last Change: 2025 Aug 24
# Converted to Vim9: Ubaldo Tiberi <[email protected]>
# WORK IN PROGRESS - The basics works stable, more to come
@@ -52,14 +52,6 @@ def Echowarn(msg: string)
enddef
# Variables to keep their status among multiple instances of Termdebug
-# Avoid to source the script twice.
-if exists('g:termdebug_loaded')
- if DEBUG
- Echoerr('Termdebug already loaded.')
- endif
- finish
-endif
-g:termdebug_loaded = true
g:termdebug_is_running = false
diff --git a/src/testdir/test_plugin_termdebug.vim
b/src/testdir/test_plugin_termdebug.vim
index c078a8511..166f4f866 100644
--- a/src/testdir/test_plugin_termdebug.vim
+++ b/src/testdir/test_plugin_termdebug.vim
@@ -597,22 +597,4 @@ 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
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1uq7zB-00Gghn-Og%40256bit.org.