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

Quitting a window with ":q" results in killing the whole tab #16

Open
kinnala opened this issue Oct 3, 2015 · 1 comment
Open

Quitting a window with ":q" results in killing the whole tab #16

kinnala opened this issue Oct 3, 2015 · 1 comment

Comments

@kinnala
Copy link

kinnala commented Oct 3, 2015

If you open multiple windows inside a tab, i.e.,

:tabnew
:vsplit
:split

and try to close a single window with ":q" you end up closing the whole tab. This differs from the behavior of Vim where only the current window is closed. Currently as a workaround I added

(evil-define-command evil-tab-sensitive-quit (&optional bang)
   :repeat nil
   (interactive "<!>")
   (if (> (length (elscreen-get-screen-list)) 1)
       (if (> (count-window) 1)
           (evil-quit)
           (elscreen-kill))
       (evil-quit bang)))

to my initfile. It should probably be investigated whether this is enough.

@quaker4lyf
Copy link

I can repro this as well:

  1. :tabe[RET]
  2. :split[RET]
  3. :q[RET]
    I observe tab is gone.

However, in step (3), if instead of ":q[RET]" I use "ZQ", it does the correct behaviour of only closing the current window. The same is true for "[M-x]evil-quit[RET]".

":q" should be mapped to evil-quit, yet obviously there's something else going on here. So I'm not sure if the bug is in evil or evil-tabs.

Edit: not using angle brackets cuz of markdown.

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

No branches or pull requests

2 participants