From fead046eedfe728c8fce8cff482f249f9b0f22c2 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Fri, 21 Feb 2014 08:17:44 +0100 Subject: [PATCH 1/3] use alt-g for filter bufferlist this is more consistent with the other existing shortcuts and is also the same shortcut go.py recommends in weechat-curses --- index.html | 2 +- js/glowingbear.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 62fc52e..fd55482 100644 --- a/index.html +++ b/index.html @@ -113,7 +113,7 @@
  • ALT-[0-9]: Focus on buffer
  • ALT-a: Focus on next buffer with activity
  • ALT-<: Switch to previous buffer
  • -
  • CTRL+G: Focus on buffer list filter
  • +
  • ALT+G: Focus on buffer list filter
  • escape: disconnect
  • arrow keys: history navigation
  • diff --git a/js/glowingbear.js b/js/glowingbear.js index 8b075e8..e984be1 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -1056,8 +1056,8 @@ weechat.directive('inputBar', function() { return true; } - // Ctrl+G -> focus on buffer filter input - if ($event.ctrlKey && (code === 103 || code === 71)) { + // Alt+G -> focus on buffer filter input + if ($event.altKey && (code === 103 || code === 71)) { $event.preventDefault(); document.getElementById('bufferFilter').focus(); return true; From 212aa1ba696f7482ba18964a70b9064bc5bbc43e Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Fri, 21 Feb 2014 08:19:15 +0100 Subject: [PATCH 2/3] use consistent format to explain shortcuts --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index fd55482..5fb74f8 100644 --- a/index.html +++ b/index.html @@ -108,12 +108,12 @@

    Shortcuts

    Glowing Bear has a few shortcuts: From e0aef4c6e1b4b7e2e0b860b4dd1dbf13faf349f4 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Fri, 21 Feb 2014 09:37:55 +0100 Subject: [PATCH 3/3] make enter switch to the first match in the list --- index.html | 2 +- js/glowingbear.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 5fb74f8..67dc1be 100644 --- a/index.html +++ b/index.html @@ -279,7 +279,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel -
  • +
  • diff --git a/js/glowingbear.js b/js/glowingbear.js index e984be1..811c0e7 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -856,7 +856,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', } // Handle enter else if (code === 13) { $event.preventDefault(); - // TODO Switch to first matching buffer and reset query + if ($scope.filteredBuffers.length > 0) { + models.setActiveBuffer($scope.filteredBuffers[0].id); + } $scope.search = ''; } };