ericcornelissen / pinned-tabs-for-atom

A package for the Atom text editor that allows you to pin tabs
https://atom.io/packages/pinned-tabs
MIT License
18 stars 3 forks source link

Error pinning multiple untitled tabs #61

Closed bergerr closed 4 years ago

bergerr commented 4 years ago

I had an untitled pinned tab and tried to pin another one, and it popped an error with the trace below:

/Users/rxb2/.atom/packages/pinned-tabs/lib/state.js:126 Hide Stack Trace TypeError: Cannot read property 'id' of undefined at /Users/rxb2/.atom/packages/pinned-tabs/lib/state.js:126:53 at Array.findIndex () at PinnedTabsState.movePaneItem (/Users/rxb2/.atom/packages/pinned-tabs/lib/state.js:126:30) at PinnedTabs.reorderTab (/Users/rxb2/.atom/packages/pinned-tabs/lib/pinned-tabs.js:347:18) at /Users/rxb2/.atom/packages/pinned-tabs/lib/pinned-tabs.js:196:35

The tab abr also rapidly flickered between the pinned tab and the tab I was trying to pin, until I unpinned the original one. After trying a few more times I was able to pin both untitled tabs.

ericcornelissen commented 4 years ago

Thanks for the report @bergerr, I can reproduce it and it seems to be a real problem (though I don't think it is very common to pin two new untitled tabs :sweat_smile:).

I think I found a solution that fixes the problem. Would you mind testing this package on branch bug-61/pin-multiple-untitled-tabs for me to see if it did? (if you need help with how to do that, please ask)

bergerr commented 4 years ago

Sure, how do I install the package from a specific branch?

ericcornelissen commented 4 years ago

To the best of my knowledge you have to clone the repository into your .atom/packages directory (make sure to remove the package directory first), check the branch out (run npm install) and reload or restart Atom.

bergerr commented 4 years ago

The branch works fine for me. 👍

ericcornelissen commented 4 years ago

Thanks for testing, I'll publish a new release based on that branch as soon as possible :+1:

ericcornelissen commented 4 years ago

The patch should now be published, let me know if the problem was not (completely) fixed :slightly_smiling_face:

chrismheath commented 4 years ago

Used to have the same issue with pinned tabs - all works for me now too. Thanks for the fix!