Ctrl-w: ignore all whitespace, not just spaces
This commit is contained in:
parent
ea4de99e89
commit
3c30e6ad07
1 changed files with 1 additions and 1 deletions
|
@ -467,7 +467,7 @@ weechat.directive('inputBar', function() {
|
||||||
// Ctrl-w
|
// Ctrl-w
|
||||||
} else if (code == 87) {
|
} else if (code == 87) {
|
||||||
var trimmedValue = $scope.command.slice(0, caretPos);
|
var trimmedValue = $scope.command.slice(0, caretPos);
|
||||||
var lastSpace = trimmedValue.replace(/ +$/, '').lastIndexOf(' ') + 1;
|
var lastSpace = trimmedValue.replace(/\s+$/, '').lastIndexOf(' ') + 1;
|
||||||
$scope.command = $scope.command.slice(0, lastSpace) + $scope.command.slice(caretPos, $scope.command.length);
|
$scope.command = $scope.command.slice(0, lastSpace) + $scope.command.slice(caretPos, $scope.command.length);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
inputNode.setSelectionRange(lastSpace, lastSpace);
|
inputNode.setSelectionRange(lastSpace, lastSpace);
|
||||||
|
|
Loading…
Reference in a new issue