Thursday, May 9, 2024

Re: Termdebug for Windows: why a "prompt" buffer instead of a terminal buffer?

On Mi, 08 Mai 2024, Ubaldo Tiberi wrote:

> Hi! 
>
> I thanks  for your reply.
> have already read it but It didn't answer any of my questions. 

I think the reason is, that on Windows using a pty may not always work.
This is briefly mentioned at :h 'termwintype'. If you sure it works for
you (because your Windows is new enough or you have winpty), you could
give it a shot in termdebug with the following patch applied and then
setting the termwintype option:

```patch
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 50833f0df..8236fc2b0 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -196,7 +196,7 @@ func s:StartDebug_internal(dict)
elseif exists('g:termdebug_use_prompt')
let use_prompt = g:termdebug_use_prompt
endif
- if has('terminal') && !has('win32') && !use_prompt
+ if has('terminal') && (!has('win32') || !empty(&termwintype)) && !use_prompt
let s:way = 'terminal'
else
let s:way = 'prompt'
```

Thanks,
Chris
--
Confess your sins to the Lord and you will be forgiven;
confess them to man and you will be laughed at.
-- Josh Billings

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/Zjx2WJlua8j1jQAa%40256bit.org.

No comments: