tabman.vim icon indicating copy to clipboard operation
tabman.vim copied to clipboard

Error in Window Closing

Open KSR-Yasuda opened this issue 3 years ago • 3 comments

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 avatar Mar 31 '22 09:03 KSR-Yasuda

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 avatar Mar 31 '22 14:03 KSR-Yasuda

Fixed.

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

KSR-Yasuda avatar Apr 04 '22 00:04 KSR-Yasuda

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

KSR-Yasuda avatar Jul 26 '22 08:07 KSR-Yasuda