Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many unlisted buffers are left opened after :VimspectorReset #879

Open
2 tasks done
ubaldot opened this issue Sep 2, 2024 · 2 comments · May be fixed by #893
Open
2 tasks done

Many unlisted buffers are left opened after :VimspectorReset #879

ubaldot opened this issue Sep 2, 2024 · 2 comments · May be fixed by #893

Comments

@ubaldot
Copy link
Contributor

ubaldot commented Sep 2, 2024

Description

I noticed that when Vimspector is closed, lot of unlisted Vimspector-related buffers are kept loaded.
Also, breakpoint signs on the source code files don't seem to be removed. I am using debugpy gadget.

Is it reproducible in vim?

Reproducible in Vim

Works with clean config?

Yes

Sample project works?

Not reproducible with sample project

Minimal Reproduction

  1. Open Vimspector and then close it.
  2. run :ls u

You should see something like the following:

  4u  -  "vimspector.StackTrace[0]"     line 1
  5u     "vimspector.Watches[0]"        line 1
  6u  -  "vimspector.Variables[0]"      line 1
  7u     "[No Name]"                    line 1
  8u     "vimspector.Console[0]"        line 1
  9u  -  "vimspector.Output:stderr[0]"  line 1
 10u  -  "_vimspector_log_0_Vimspector" line 1
 13u  -  "vimspector.Output:server[0]"  line 1

Expected Behaviour

Unlisted Vimpspector-related buffers are wiped out when exiting vimspector.

Actual Behaviour

Unlisted Vimpspector-related buffers are not wiped out when exiting vimspector.

Additional information

No response

Installation Type

Plugin Manager (git clone)

Vimspector version

af13695

Debug Info

No response

Log file

No response

Vim version

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jun 24 2024 00:58:05)
Included patches: 1-516

Python version

No response

Neovim diagnostics

No response

Operating System

Ubuntu 24.04 on WSL2 over Win10 machine.

Declaration

@ubaldot
Copy link
Contributor Author

ubaldot commented Nov 1, 2024

Seems related: #796

@puremourning
Copy link
Owner

my initial thought is that this is actually intentional. the session still exists in vimspector's session manager (you can even add the session name to your status line like I do):

Screenshot 2024-11-07 at 20 00 49

You can Destroy the current session with :VimspectorDestroy ... at which point I sort of expected these buffers to go, but they actually don't, so there is a slght issue here.

But it's a tiny issue. These buffers are unloaded so don't actually consume anything other than oh-so-valuable buffer numbers. One day we'll run out.

But then I remembered, hang on I'm sure I clean up buffers. And I do, but I use bdelete not bwipeout.

Fix incoming.

puremourning added a commit that referenced this issue Nov 7, 2024
Some people are really picky about their buffer numbers and not having
unlisted, unloaded buffers in the buffer list. I personally don't care
and like the fact that marks and stuff are retained between runs, but I
don't care enough to really fight it. This is cleaner afterall.

Closes #879
@puremourning puremourning linked a pull request Nov 7, 2024 that will close this issue
puremourning added a commit that referenced this issue Nov 16, 2024
Some people are really picky about their buffer numbers and not having
unlisted, unloaded buffers in the buffer list. I personally don't care
and like the fact that marks and stuff are retained between runs, but I
don't care enough to really fight it. This is cleaner afterall.

Closes #879
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants