Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Git Commit causes tab change #354

Closed
pdxwolfy opened this issue Dec 26, 2015 · 10 comments
Closed

Git Commit causes tab change #354

pdxwolfy opened this issue Dec 26, 2015 · 10 comments
Labels

Comments

@pdxwolfy
Copy link

Every time I do a commit, the current tab is set to the leftmost open tab. Can Git Plus be modified to not change the current tab? TIA.

@akonwi
Copy link
Owner

akonwi commented Dec 26, 2015

Would it be possible to show me a clip of this? Also are there any errors in the dev console?

The package tries to go back to your active tab before the commit message

@pdxwolfy
Copy link
Author

Hi akonwi,

I'm attaching a clip. Note that there are no console messages - not even an info message.
badtab.zip

@pdxwolfy
Copy link
Author

Actually, it turns out that there is a console message that appears immediately after I open Atom:

/Users/wolfy/.atom/packages/tree-view-git-branch/lib/main.js:66 Cannot read property 'classList' of null TypeError: Cannot read property 'classList' of null
at getProjectRootEl (/Users/wolfy/.atom/packages/tree-view-git-branch/lib/main.js:65:12)
at /Users/wolfy/.atom/packages/tree-view-git-branch/lib/main.js:54:29
at process._tickCallback (node.js:368:9)(anonymous function) @ /Users/wolfy/.atom/packages/tree-view-git-branch/lib/main.js:66

@akonwi
Copy link
Owner

akonwi commented Dec 27, 2015

The error in the console is coming from the tree-view-git-branch package.

That behavior is really odd though. There isn't anything that changes the tab. It simply saves a reference to the current pane. Which version of atom are you using?

@pdxwolfy
Copy link
Author

Version 1.3.2

@pdxwolfy
Copy link
Author

It looks to be some sort of conflict with another package: tab-smart-sort - if I disable that package, the tab change does not occur. As to which of the two packages is actually changing the tab, though ... Git-Plus processes all the modified files, but probably shouldn't need to change the tab, and the tab sorter is only supposed to do something when opening a file. I'll report the issue to that package's maintainer too.

@akonwi
Copy link
Owner

akonwi commented Dec 29, 2015

I installed that package myself and this 'bug' only happens when the Place Special Tabs On Right setting is set to true.

I think I've figured out why this happens though. In order to open a new pane in a certain direction, my package opens the file normally and then copies it into a new pane in the desired direction and closes the original texteditor. When that original editor is destroyed, the next tab is activated by default in the pane.

I'll need to explore a more direct way of opening the file in a new pane. I think you can close the issue in the other package

@akonwi akonwi added the bug label Dec 29, 2015
@pdxwolfy
Copy link
Author

I tried turning off that setting, and the only difference I see is that the first tab I opened gets selected, not the left-most tab. Weird.

@pdxwolfy
Copy link
Author

Confirming that this fix seems to do the trick. Thank you

@akonwi
Copy link
Owner

akonwi commented Jan 15, 2016

Glad to hear it! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants