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

Error in Window Closing #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KSR-Yasuda
Copy link

@KSR-Yasuda KSR-Yasuda commented Mar 31, 2022

It shows an error in window closing by x key in TabManager window:

function <SNR>156_ManDelete の処理中にエラーが検出されました:
行   22:
E16: 無効な範囲です:  3winc w

It says unavialable range of 3.

Do below to repro:

  1. Set let g:tabman_side = 'right' in .vimrc
  2. Run vim
    • 1 window exists
  3. Open new window
    • 2 window exists
  4. Open TabManager window
    • 3 window exists
  5. Close a window by x hotkey in TabManager window
    • Then, it closes a window, and it has 2 windows including TabManager
    • After that, it tries to close window 3, but range over
      • It was old TabManager window number in g:tabman_side = 'right' case

I think this line is unnecessary.
Why you do this line?

@KSR-Yasuda
Copy link
Author

I misunderstood: that line was not window closing,
but going back to the window where it had been, was it?

So, it should decriment curwin
if s:ManSelect()-ed (or closing) window is before curwin, huh?
(Also, if curwin is the closing window, it should move to another.)

It is the case with g:tabman_side = 'right',
as it will likely to close an window before TabManager.

I'll check and fix it later.

@KSR-Yasuda
Copy link
Author

Fixed.

Besides window, closing tab before current tab had the same problem.

@KSR-Yasuda
Copy link
Author

Fixed: g:tabman_side = 'right' and closing the tabman window itself.

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 this pull request may close these issues.

1 participant