|
|
|
@ -251,11 +251,16 @@ weechat.directive('inputBar', function() { |
|
|
|
|
var filteredBufferNum; |
|
|
|
|
var activeBufferId; |
|
|
|
|
|
|
|
|
|
// if Alt+J was pressed last, we expect two numbers now
|
|
|
|
|
if ($rootScope.showJumpKeys && !$event.altKey && (code > 47 && code < 58) && $scope.jumpDecimal === undefined) { |
|
|
|
|
// if Alt+J was pressed last...
|
|
|
|
|
if ($rootScope.showJumpKeys) { |
|
|
|
|
// ... we expect two digits now
|
|
|
|
|
if (!$event.altKey && (code > 47 && code < 58)) { |
|
|
|
|
// first digit
|
|
|
|
|
if ($scope.jumpDecimal === undefined) { |
|
|
|
|
$scope.jumpDecimal = code - 48; |
|
|
|
|
$event.preventDefault(); |
|
|
|
|
} else if ($rootScope.showJumpKeys && !$event.altKey && (code > 47 && code < 58) && $scope.jumpDecimal !== undefined) { |
|
|
|
|
// second digit
|
|
|
|
|
} else { |
|
|
|
|
bufferNumber = ($scope.jumpDecimal * 10) + (code - 48) - 1; |
|
|
|
|
// quick select filtered entries
|
|
|
|
|
if (($scope.$parent.search.length || $scope.$parent.onlyUnread) && $scope.$parent.filteredBuffers.length) { |
|
|
|
@ -282,10 +287,12 @@ weechat.directive('inputBar', function() { |
|
|
|
|
$event.preventDefault(); |
|
|
|
|
$rootScope.showJumpKeys = false; |
|
|
|
|
$scope.jumpDecimal = undefined; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$rootScope.showJumpKeys = false; |
|
|
|
|
$scope.jumpDecimal = undefined; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Left Alt+[0-9] -> jump to buffer
|
|
|
|
|
if ($event.altKey && !$event.ctrlKey && (code > 47 && code < 58)) { |
|
|
|
@ -414,9 +421,7 @@ weechat.directive('inputBar', function() { |
|
|
|
|
// Alt+J -> Jump to buffer
|
|
|
|
|
if ($event.altKey && (code === 106 || code === 74)) { |
|
|
|
|
$event.preventDefault(); |
|
|
|
|
|
|
|
|
|
$rootScope.showJumpKeys = true; |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|