make enter switch to the first match in the list
This commit is contained in:
parent
212aa1ba69
commit
e0aef4c6e1
2 changed files with 4 additions and 2 deletions
|
@ -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 = '';
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue