From e0aef4c6e1b4b7e2e0b860b4dd1dbf13faf349f4 Mon Sep 17 00:00:00 2001 From: Felix Eckhofer Date: Fri, 21 Feb 2014 09:37:55 +0100 Subject: [PATCH] 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 = ''; } };