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

:tabedit FILENAME opens 2 tabs at once, both FILENAME and the file from which opening #3150

Closed
jerabaul29 opened this issue Feb 17, 2021 · 4 comments · Fixed by #3755
Closed
Labels
A-tab-pages Area: Tab Pages (Vim-style tabs) A-vim Area: Vim/modal editing bug Something isn't working

Comments

@jerabaul29
Copy link

I noticed a small bug that is a minor daily annoyance (Ubuntu 20.04, Onivim 2 (0.5.9-nightly) ).

If I am editing a file FILE_1 and I open a new tab with tabedit FILE_2, the new tab has both the FILE_1 and FILE_2 buffers open.

Before doing the tabedit:

Screenshot from 2021-02-17 08-54-01

After the :tabedit assert_tools.h (note that 2 buffers are open in the last tab, both vector_and_quaternion.h from which I issued the tabedit, and assert_tools.h:

Screenshot from 2021-02-17 08-54-11

@jerabaul29
Copy link
Author

(i.e., I would like / think it would be more logical, in the second screenshot, to only have the assert_tools.h buffer opened, see the top list of buffers; the list of tabs as seen at the bottom list of tabs looks good)

@bryphe bryphe added A-tab-pages Area: Tab Pages (Vim-style tabs) A-vim Area: Vim/modal editing bug Something isn't working labels Feb 18, 2021
@Pipe-Runner
Copy link

Yup. I was having fun switching to Tab->Window->Buffer mindset from the VSCode world but this was really offputting for me to have an extra file opened every time I opened a new tab. Glad it is being tracked.

@jerabaul29
Copy link
Author

Any update on this? It is actually really painful in daily life, because it introduces "cognitive dissonance". If I :tabedit to look at some file, and then :q, I expect that I am back to the "initial" state of matters, but it is not the case, since I now have one more tab... Even though I know about this bug, I get bitten by it and confused several times a day. Any way around / setting to kill the bug or similar @bryphe ? :)

bryphe added a commit that referenced this issue Jul 9, 2021
__Issue:__ Using `:tabnew` or `:tabedit` (or Control+T in #3733) would create a new vim-style layout tab, but there'd be an extra 'editor tab' in the initial window split.

__Defect:__ There was an extra copy/create of the editor in the layout code.

__Fix:__ Remove extraneous copy

__Todo:__
- [x] Add regression test
@bryphe
Copy link
Member

bryphe commented Jul 9, 2021

Should be fixed now with #3755 ; feel free to re-open if you still hit this.

@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-tab-pages Area: Tab Pages (Vim-style tabs) A-vim Area: Vim/modal editing bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants