Fix tab-completion of empty string

Closes #301
This commit is contained in:
Lorenz Hübschle-Schneider 2014-05-13 12:16:05 +01:00
parent 38f5e998fc
commit e53f614a04
1 changed files with 5 additions and 2 deletions

View File

@ -1233,9 +1233,12 @@ weechat.directive('inputBar', function() {
// get current active buffer
var activeBuffer = models.getActiveBuffer();
// Empty input makes $scope.command undefined -- use empty string instead
var input = $scope.command || '';
// complete nick
var nickComp = IrcUtils.completeNick($scope.command, caretPos,
$scope.iterCandidate, activeBuffer.getNicklistByTime(), ':');
var nickComp = IrcUtils.completeNick(input, caretPos, $scope.iterCandidate,
activeBuffer.getNicklistByTime(), ':');
// remember iteration candidate
$scope.iterCandidate = nickComp.iterCandidate;