Fix an exception when pressing up-arrow in a buffer without history
This commit is contained in:
parent
cbcae58760
commit
57ce4e252a
1 changed files with 3 additions and 1 deletions
|
@ -1577,7 +1577,9 @@ weechat.directive('inputBar', function() {
|
||||||
// Set cursor to last position. Need 0ms timeout because browser sets cursor
|
// Set cursor to last position. Need 0ms timeout because browser sets cursor
|
||||||
// position to the beginning after this key handler returns.
|
// position to the beginning after this key handler returns.
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
if ($scope.command) {
|
||||||
inputNode.setSelectionRange($scope.command.length, $scope.command.length);
|
inputNode.setSelectionRange($scope.command.length, $scope.command.length);
|
||||||
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue