[vim/vim] Fix errors in using the latest termdebug.vim (PR #14941)

68 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jun 8, 2024, 11:45:32 AM6/8/24
to vim/vim, Subscribed

If you add a defcompile statement to the end of the latest termdebug.vim script, there are a few compilation errors.
This PR addresses a few of them.

I also noticed that the commit ca48202 changed the
termdebug window layout. I am used to having the GDB window and the client program window as horizontally split windows on
the left and the vertically split source window on the right. This makes it easy to switch between the GDB window and the source
window. After this commit, now all the windows are vertically split (with the GDB window on the left, the client program window
in the middle and the source window on the right). This makes it difficult to switch between the GDB window and the source
window. I don't know the reasoning for this change.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/14941

Commit Summary

  • 9548033 Fix errors in using the latest termdebug.vim

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941@github.com>

Shane-XB-Qian

unread,
Jun 8, 2024, 12:04:19 PM6/8/24
to vim/vim, Subscribed

thanks for your trying to patch-up that!
i've forsee that, without enough varify and experienced author such big change not sure would cost how much pain to fix all.

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/c2156087285@github.com>

Shane-XB-Qian

unread,
Jun 8, 2024, 12:18:27 PM6/8/24
to vim/vim, Subscribed

i meant the vim9 convert,
as for the layout #13474 (comment) had explained it.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/c2156091849@github.com>

Yegappan Lakshmanan

unread,
Jun 8, 2024, 12:23:07 PM6/8/24
to vim...@googlegroups.com, reply+ACY5DGEOGBXJGSK3LK...@reply.github.com, vim/vim, Subscribed
On Sat, Jun 8, 2024 at 9:18 AM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

i meant the vim9 convert,
as for the layout #13474 (comment) had explained it.


What was the problem the layout change was trying to address?  The layout was usable before
this change.  With this change now, it is difficult to switch between the GDB window and the source
window (because there are other windows in the middle).  Also, the source code window has
less than 80 characters leading to the wrapping of the source code.  This change should be
reverted.

Regards,
Yegappan
 

vim-dev ML

unread,
Jun 8, 2024, 12:23:34 PM6/8/24
to vim/vim, vim-dev ML, Your activity

On Sat, Jun 8, 2024 at 9:18 AM Shane-XB-Qian ***@***.***>
wrote:

> i meant the vim9 convert,
> as for the layout #13474 (comment)
> <https://github.com/vim/vim/pull/13474#issuecomment-1790687647> had
> explained it.
>
>
> What was the problem the layout change was trying to address? The layout
was usable before
this change. With this change now, it is difficult to switch between the
GDB window and the source
window (because there are other windows in the middle). Also, the source
code window has
less than 80 characters leading to the wrapping of the source code. This
change should be
reverted.

Regards,
Yegappan


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/c2156093405@github.com>

Shane-XB-Qian

unread,
Jun 8, 2024, 12:33:28 PM6/8/24
to vim/vim, vim-dev ML, Comment

it is difficult to switch between the GDB window and the source window (because there are other windows in the middle).

i do not know how or what was leading you to such result, since the layout change looked was about 'Var' and 'Asm' window;
maybe that vim9 convert? i did not upgrade this convert yet (which i forsee there would be some broken since changed too much), so maybe you can varify that convert more if it was ok to do so? i may more trust you did that.


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2156096354@github.com>

Shane-XB-Qian

unread,
Jun 8, 2024, 12:54:36 PM6/8/24
to vim/vim, vim-dev ML, Comment

or revert that vim9 convert for termdebug (and actually i recalled somewhere bram or someone expressed wanted to keep termdebug as legacy vim script before, not sure why now it convert to vim9).
after that, if you still found it was the auto-layout of Var and Asm make you face that problem, then i am ok you to revert that one too.


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2156102416@github.com>

Yegappan Lakshmanan

unread,
Jun 8, 2024, 1:24:51 PM6/8/24
to vim...@googlegroups.com, reply+ACY5DGFBWCXR7C5H4A...@reply.github.com, vim/vim, vim-dev ML, Comment
On Sat, Jun 8, 2024 at 9:33 AM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

it is difficult to switch between the GDB window and the source window (because there are other windows in the middle).

i do not know how or what was leading you to such result, since the layout change looked was about 'Var' and 'Asm' window;
maybe that vim9 convert? i did not upgrade this convert yet (which i forsee there would be some broken since changed too much), so maybe you can varify that convert more if it was ok to do so? i may more trust you did that.


The change in window layout is not caused by the Vim9 script conversion.  This is caused by

Regards,
Yegappan

vim-dev ML

unread,
Jun 8, 2024, 1:25:16 PM6/8/24
to vim/vim, vim-dev ML, Your activity

On Sat, Jun 8, 2024 at 9:33 AM Shane-XB-Qian ***@***.***>
wrote:

> it is difficult to switch between the GDB window and the source window
> (because there are other windows in the middle).
>
> i do not know how or what was leading you to such result, since the layout
> change looked was about 'Var' and 'Asm' window;
> maybe that vim9 convert? i did not upgrade this convert yet (which i
> forsee there would be some broken since changed too much), so maybe you can
> varify that convert more if it was ok to do so? i may more trust you did
> that.
>
>
> The change in window layout is not caused by the Vim9 script conversion.
This is caused by
the changes made in
https://github.com/vim/vim/commit/ca48202b6f46cfb40a0d1d80033a2f3e8cb7b813.

Regards,
Yegappan


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/c2156111819@github.com>

Shane-XB-Qian

unread,
Jun 8, 2024, 2:08:22 PM6/8/24
to vim/vim, vim-dev ML, Comment

what other window in the middle you were trying to say?
did you manually opened var/asm window?
if yes, you still also can move that window to bottom or somewhere by manually too.
// if say so, otherwise I did not know but wish you keep to review this vim9 convert of termdebug if not revert this vim9 convert.

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2156125093@github.com>

Yegappan Lakshmanan

unread,
Jun 8, 2024, 8:38:47 PM6/8/24
to vim...@googlegroups.com, reply+ACY5DGDQKAXM27HTDF...@reply.github.com, vim/vim, vim-dev ML, Comment
On Sat, Jun 8, 2024 at 11:08 AM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

what other window in the middle you were trying to say?
did you manually opened var/asm window?

No.  I am not using the var/asm windows.  I use the following termdebug option to
set the window width:

let g:termdebug_config = {}
let g:termdebug_config['wide'] = 164

With the above setting, when I run the ":Termdebug ./vim" command from the Vim src
directory, I used to get a window layout with two vertically split windows.  The left window
is horizontally split into two windows with GDB in the top window and Vim in the bottom
window.  The vertically split right window contains the source.

After this patch, now I get three vertically split windows.  GDB in the leftmost window,
Vim in the middle window and the source in the rightmost window.

- Yegappan

vim-dev ML

unread,
Jun 8, 2024, 8:39:12 PM6/8/24
to vim/vim, vim-dev ML, Your activity

On Sat, Jun 8, 2024 at 11:08 AM Shane-XB-Qian ***@***.***>


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/c2156245004@github.com>

Yegappan Lakshmanan

unread,
Jun 8, 2024, 8:55:07 PM6/8/24
to vim/vim, vim-dev ML, Push

@yegappan pushed 1 commit.

  • e894716 Fix the remaining compile errors in termdebug


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/before/9548033a35585867b5f716e9c0911ac432efdd5a/after/e8947162bd42d30716c2ea411adc78817216168b@github.com>

Yegappan Lakshmanan

unread,
Jun 8, 2024, 8:55:36 PM6/8/24
to vim/vim, vim-dev ML, Push

@yegappan pushed 1 commit.

  • dcbd63c Fix errors in using the latest termdebug.vim

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/before/e8947162bd42d30716c2ea411adc78817216168b/after/dcbd63c20f599d9094a34c6119beed7bd0e29001@github.com>

Yegappan Lakshmanan

unread,
Jun 8, 2024, 10:50:34 PM6/8/24
to vim/vim, vim-dev ML, Push

@yegappan pushed 1 commit.

  • a65e52f Use the new function for the Stop and Continue commands

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/before/dcbd63c20f599d9094a34c6119beed7bd0e29001/after/a65e52faedb4d856582df16b86a2457a80c443b9@github.com>

Shane-XB-Qian

unread,
Jun 9, 2024, 12:08:20 AM6/9/24
to vim/vim, vim-dev ML, Comment

> > what other window in the middle you were trying to say?
> > did you manually opened var/asm window?
> >
>
> No. I am not using the var/asm windows. I use the following
> termdebug option to
> set the window width:
>
> let g:termdebug_config = {}
> let g:termdebug_config['wide'] = 164

then i do not know what happened to you, since the auto-layout is only about 'Var' and 'Asm' window,
if you did not manually open it (or enabled the option of auto, but i supposed you would not do so),
it should be not impact your other windows e.g source and gdb window.
// please check the code _before_ https://github.com/vim/vim/pull/14903 that vim9 convert,
// or after that convert, but i did not upgrade or tried to use that _yet_.

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2156306279@github.com>

ubaldot

unread,
Jun 9, 2024, 4:15:20 AM6/9/24
to vim/vim, vim-dev ML, Comment

@yegappan Thanks for the changes, and sorry to have missed several spaces here and there. I like the introduction of StopCommand() and ContinueCommand(). I am planning to further exploit Vim9 import/export features to refactor the code and I will also try to use some funcrefs (example: switching funcref in a Init() function depending on the value of the variable way for example, but I identified several other places). My idea is to try to refactor the architecture in a more readable/easy-to-maintain/flexible way that shall easy e.g. the introduction of lldb(I read somewhere wish it) and perhaps DAP:s. Will I succeed? I dunno :) I'll send a PR once done.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2156382253@github.com>

Christian Brabandt

unread,
Jun 9, 2024, 10:42:21 AM6/9/24
to vim/vim, vim-dev ML, Comment

thanks! May be we need to find out what causes the layout switch again. I though this only happens in the ASM or variable window when this is opened ?


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2156636231@github.com>

Christian Brabandt

unread,
Jun 9, 2024, 10:43:48 AM6/9/24
to vim/vim, vim-dev ML, Comment

Closed #14941 via 03a3df1.


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/issue_event/13091652265@github.com>

Nick Jensen

unread,
Jun 9, 2024, 4:56:21 PM6/9/24
to vim/vim, vim-dev ML, Comment

Christian asked twice in #13474 for screenshots to demonstrate what that PR should do. None were given. Now this discussion here involves a lot of confusion about which extra windows are displayed where with what options ... it would be much simpler if people could start including screenshots when discussing layout changes/issues. A picture paints a thousand words etc.


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2156785771@github.com>

Yegappan Lakshmanan

unread,
Jun 9, 2024, 10:10:23 PM6/9/24
to vim...@googlegroups.com, reply+ACY5DGH6GHEVLYKDBN...@reply.github.com, vim/vim, vim-dev ML, Comment
On Sat, Jun 8, 2024 at 9:08 PM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

> > what other window in the middle you were trying to say?
> > did you manually opened var/asm window?
> >
>
> No. I am not using the var/asm windows. I use the following
> termdebug option to
> set the window width:
>
> let g:termdebug_config = {}
> let g:termdebug_config['wide'] = 164

then i do not know what happened to you, since the auto-layout is only about 'Var' and 'Asm' window,
if you did not manually open it (or enabled the option of auto, but i supposed you would not do so),
it should be not impact your other windows e.g source and gdb window.
// please check the code _before_ https://github.com/vim/vim/pull/14903 that vim9 convert,
// or after that convert, but i did not upgrade or tried to use that _yet_.



This turned out to be a bug in the term_start() function.  This function doesn't clear the vertical
split command modifier correctly.  I have opened a PR to address this.

Regards,
Yegappan


 

vim-dev ML

unread,
Jun 9, 2024, 10:10:54 PM6/9/24
to vim/vim, vim-dev ML, Your activity

On Sat, Jun 8, 2024 at 9:08 PM Shane-XB-Qian ***@***.***>
wrote:

> > > what other window in the middle you were trying to say?
> > > did you manually opened var/asm window?
> > >
> >
> > No. I am not using the var/asm windows. I use the following
> > termdebug option to
> > set the window width:
> >
> > let g:termdebug_config = {}
> > let g:termdebug_config['wide'] = 164
>
> then i do not know what happened to you, since the auto-layout is only
> about 'Var' and 'Asm' window,
> if you did not manually open it (or enabled the option of auto, but i
> supposed you would not do so),
> it should be not impact your other windows e.g source and gdb window..
> // please check the code _before_ https://github.com/vim/vim/pull/14903
> that vim9 convert,
> // or after that convert, but i did not upgrade or tried to use that _yet_.
>
>
>
This turned out to be a bug in the term_start() function. This function
doesn't clear the vertical
split command modifier correctly. I have opened a PR to address this.

Regards,
Yegappan


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14941/c2157053883@github.com>

Shane-XB-Qian

unread,
Jun 13, 2024, 3:20:15 AM6/13/24
to vim/vim, vim-dev ML, Comment

@chrisbra could we keep the legacy version of termdebug, which like coloschema, e.g `foo` vs `foo_256`?
// untill there some confident vim9 version can replace with legacy version, or just keep two version for good,
// if so, whatever vim9 version what changes (#14978 etc) going to be but kept the legacy version stable,
// same like some people like classic native coloschema vs not their refactor ones.

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/14941/c2164789007@github.com>

Reply all
Reply to author
Forward
0 new messages