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

Fix Alt+[0-9] behaviour to respect order of merged buffers #867

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lorenzhs
Copy link
Member

This has been bugging me for a long time. When connecting to more networks, the newest ones will be first in the buffers object, so alt+1 will go there. But it should go to core.weechat. Fix this by adding the index as sort criterion.

This matches the getBufferQuickKeys() behaviour.

@@ -359,8 +360,7 @@ weechat.directive('inputBar', function() {

// Alt-h -> Toggle all as read
if ($event.altKey && !$event.ctrlKey && code === 72) {
var buffers = models.getBuffers();
_.each(buffers, function(buffer) {
_.each(models.getBuffers(), function(buffer) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kind of ridiculous to fix jshint by getting rid of this binding but honestly I find this solution preferable to renaming buffers above. Or maybe pull it up to the beginning of the function?

@lorenzhs lorenzhs changed the title Fix Alt+[0-9] behaviour to respect order of merged buffers [WIPFix Alt+[0-9] behaviour to respect order of merged buffers Nov 11, 2016
@lorenzhs lorenzhs changed the title [WIPFix Alt+[0-9] behaviour to respect order of merged buffers [WIP] Fix Alt+[0-9] behaviour to respect order of merged buffers Nov 11, 2016
@lorenzhs
Copy link
Member Author

lorenzhs commented Nov 11, 2016

Marked WIP because it doesn't seem to handle filtered buffers correctly

Edit: Can't really reproduce, filtered buffers work just fine? And "show only unread" doesn't affect quick keys so it shouldn't affect this either imho

@lorenzhs lorenzhs changed the title [WIP] Fix Alt+[0-9] behaviour to respect order of merged buffers Fix Alt+[0-9] behaviour to respect order of merged buffers Dec 1, 2016
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.

None yet

1 participant