Skip to content

Re-implemented #3

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Re-implemented #3

wants to merge 1 commit into from

Conversation

elig0n
Copy link

@elig0n elig0n commented Apr 28, 2021

Hi,

I've re-implemented the main functionality of the script by using the callback's activeInfo object properties instead of sort.
This should provide better speed as it does not need to fetch & sort the whole list of active tabs with every tab event.
It also solves issue #1 where background tabs are mistaken to be last activated.

P.S I have commented out the callback's wait() call because it proved to be unnecessary on my system besides also creating a noticeable lag with the somewhat high value 300 that it was set to initially.

Let me know what you think

@davidsierradz
Copy link
Owner

davidsierradz commented May 1, 2021

Hi, thanks for this!

I don't remember the exact details of why I chose to implement it that way (with getSortedWinTabs). If my memory doesn't fail me, it was because Tridactyl implemented the alternate buffer (# or :help alternate-file) with that helper function: tridactyl/excmds.ts at a1c5201142bffe4a0f027694dfce22eee9708d9b · tridactyl/tridactyl.

Also, I think I was also using Ctrl+Tab cycles through tabs in recently used order option. So when I open a tab in the background, and you press <C-Tab> it goes to that recently opened tab, check this:

Peek 2021-05-01 12-26

I'm guessing that the primary reason I developed this extension was to always have a visual indicator of where I'll land after pressing Firefox's <C-Tab> or Tridactyl <C-^>/:buffer #

I guess the Venn diagram of TST, Tridactyl and weird <C-Tab> users is very small.

About the callback's wait(). I developed and used this extension in a crappy and extremely slow dual core atom and mechanical disk laptop, without it I was having randomly sync problems and bad results. This doesn't happen anymore (yay!).

I'm not using Firefox or TST much these days (qutebrowser fanboy now), so I'm don't have a dog in this fight. Just stating where I come from. ¿What do you think?

Thanks again.

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

Successfully merging this pull request may close these issues.

2 participants