]> git.feebdaed.xyz Git - 0xmirror/vim.git/commitdiff
runtime(termdebug): update v:shell_error condition test.
authorMiguel Barro <miguel.barro@live.com>
Fri, 26 Dec 2025 15:19:41 +0000 (15:19 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 26 Dec 2025 15:19:41 +0000 (15:19 +0000)
vim9 conditions only admit 0 or 1 integers, however the return value of
shells is not limited to either 0 or 1 (e.g. powershell)

closes: #19010

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim

index cefa1a08554b836b63633beb5f8afd3ee2eecd61..6627bf4b4fd6a79b61d20816d57e6ebbf3586d5c 100644 (file)
@@ -4,7 +4,7 @@ vim9script
 
 # Author: Bram Moolenaar
 # Copyright: Vim license applies, see ":help license"
-# Last Change: 2025 Oct 08
+# Last Change: 2025 Dec 26
 # Converted to Vim9: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
 
 # WORK IN PROGRESS - The basics works stable, more to come
@@ -454,7 +454,7 @@ def GetRemotePtyCmd(gdb_cmd: list<string>): list<string>
         term_cmd = gdb_cmd[0 : gdb_pos - 1]
         # roundtrip to check if socat is available on the remote side
         silent call system(join(term_cmd, ' ') .. ' socat -h')
-        if v:shell_error
+        if v:shell_error != 0
           Echowarn('Install socat on the remote machine for a program window better experience')
         else
           # create a devoted tty slave device and link to stdin/stdout