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

strange behavior opening a :term: open 2 new tabs #2055

Closed
jerabaul29 opened this issue Jul 2, 2020 · 4 comments
Closed

strange behavior opening a :term: open 2 new tabs #2055

jerabaul29 opened this issue Jul 2, 2020 · 4 comments
Labels
A-terminal Area: Integrated terminal bug Something isn't working

Comments

@jerabaul29
Copy link

There is a strange behavior when using the :term command: it looks like 2 new tabs get created, 1 is the terminal, 1 is an (additional) view of the window from which the terminal-opening command was issued. See screenshot (there are 2 tabs in the bottom half: 'welcome' and the terminal. Both were opened by the :term command while I would want only the terminal, it is strange to need to close 2 tabs when done :) ) :

Screenshot from 2020-07-02 21-49-47

@bryphe bryphe added A-terminal Area: Integrated terminal bug Something isn't working labels Jul 3, 2020
@lessp
Copy link
Contributor

lessp commented Jul 22, 2020

Also experiencing this, also, not sure if related, but when tabbing between windows, Welcome is still there while not visible anywhere on screen and tabbing to it creates a new tab with it.

image

@glennsl
Copy link
Member

glennsl commented Jul 22, 2020

That's a different issue @lessp. See #1192. But this issue also applies to splits generally, not just terminals. The underlying problem is a bit of a chicken-and-egg one: You can't create a split without a buffer, and you can't create a buffer without it automatically opening a new editor since libvim currently isn't able to distinguish between buffers being open internally, buffers being opened externally and already opened buffers being switched to. They all just emit a BufferEnter event. So i think the proper fix here is to have libvim emit more fine-grained events.

@jerabaul29
Copy link
Author

Would it be possible, as a temporary fix, that the :term command 1) split opening a new buffer as this is necessary, 2) opens the terminal in the new split 3) close the un-used buffer? Of course this is a relatively ugly patch, but would make things much more usable.

@bryphe
Copy link
Member

bryphe commented Jul 9, 2021

Was looking at this along with #3150 - looks like this no longer reproduces

@bryphe bryphe closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-terminal Area: Integrated terminal bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants