1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 326 forks source link

Bug Report: Sometimes closeTab will close all tabs #609

Closed 0xC0FFEE closed 6 years ago

0xC0FFEE commented 6 years ago

First I'd like to thank you for this great plugin which I've been using for quite some time now. Thanks!

When closing the currently active Tab by pressing x (mapped to closeTab), in rare circumstances all tabs of the current window will be closed. This only seems to happen when the active tab is playing a video.

Steps to reproduce:

  1. Open a new window with two tabs
  2. Navigate one of the tabs to e.g. youtube and play any video
  3. Press x to close the active youtube tab
  4. Sometimes the whole windows gets closed
vnikk commented 6 years ago

Are you pressing 0-9 to skip through video? Pressing 7 and then x will close 7 tabs. I've not found how to fix this, but disabling x on youtube should work.

0xC0FFEE commented 6 years ago

I am definitely using 0-9 to skip through videos, but FWICR I could reproduce the issue without touching 0-9 at all.

But I must admit, opening many tabs and using e.g. 100x looks suspiciously like the behavior I'm experiencing sometimes.

Thank you very much for your insightful response, which might help me to find a workaround :tada:.

0xC0FFEE commented 6 years ago

I found the following (potential) workaround:

site '*://*.youtube.com/*' {
  map x 0:quit<CR>
}

Which remaps x to always close the current tab only. So e.g. 100x will still only close the current tab.

0xC0FFEE commented 6 years ago

From my testing so far, this seems to fix my problem. Thanks again @vnikk for pointing me in the right direction.