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

Closing vimspector tab can raise error or close wrong tab #771

Open
2 tasks done
alps2006 opened this issue May 9, 2023 · 3 comments
Open
2 tasks done

Closing vimspector tab can raise error or close wrong tab #771

alps2006 opened this issue May 9, 2023 · 3 comments
Labels
bug Something isn't working Severity 1 The plugin or a given workflow is totally unusable

Comments

@alps2006
Copy link

alps2006 commented May 9, 2023

Description

Debugger quit exceptionally when closing a new tab that inserted before vimspector tab.

I found that vimspector session can be queried by tabpagenr in neovim, but that inserting a new tab can lead tabpagenr changed.

Works in vim?

Only broken in Neovim

Works with clean config?

Yes

Sample project works?

Reproducable with sample project

Minimal Reproduction

List of steps to reproduce:

  1. Launch a debugger.
  2. Run a command tabpagenr()-1 tabnew
  3. Close the new tab.

Expected Behaviour

Debugger don't quit.

Actual Behaviour

Debugger quit.

Additional information

No response

Installation Type

Plugin Manager (git clone)

Vimspector version

latest

Debug Info

No response

Log file

No response

Vim version

nvim 8.x

Python version

No response

Neovim diagnostics

No response

Operating System

No response

Declaration

@alps2006
Copy link
Author

alps2006 commented May 9, 2023

The snippet in

s = _vimspector_session_man.FindSessionByTab( int( vim.eval( 'a:afile' ) ) )

@puremourning
Copy link
Owner

Thanks for the report.

I'm not sure this is fixable because neovim... neovim/neovim#16327. Feel free to badger them to fix this - it's the only way.

It seems that although tabs aren't correctly invalidated, their tab numbers are updated before TabClosed is called, so there's no way for Vimspector to know that you closed a tab which wasn't the vimspector tab but is now.

@puremourning puremourning added bug Something isn't working Upstream Big or issue in upstream server neovim only Only broken in neovim labels Jun 27, 2023
@puremourning
Copy link
Owner

I think this actually broken in Vim too, but in a different (worse?) way. I think we end up closing the wrong tab sometimes :(

@puremourning puremourning added Severity 1 The plugin or a given workflow is totally unusable and removed neovim only Only broken in neovim Upstream Big or issue in upstream server labels Jul 19, 2023
@puremourning puremourning changed the title Vimspector tab close exceptionally Closing vimspector tab can raise error or close wrong tab Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Severity 1 The plugin or a given workflow is totally unusable
Projects
None yet
Development

No branches or pull requests

2 participants