Check weechat version
This commit is contained in:
parent
de41b7c0fa
commit
4bacb850cf
@ -79,8 +79,10 @@ weechat.directive('inputBar', function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.completeNick = function() {
|
$scope.completeNick = function() {
|
||||||
if ( $scope.command.startsWith('/') ) {
|
if ((models.version[0] == 2 && models.version[1] >= 9 || models.version[0] > 2) &&
|
||||||
// We are completing a command, an other function will do this
|
$scope.command.startsWith('/') ) {
|
||||||
|
// We are completing a command, another function will do
|
||||||
|
// this on WeeChat 2.9 and later
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +126,11 @@ weechat.directive('inputBar', function() {
|
|||||||
var commandCompletionPositionInList;
|
var commandCompletionPositionInList;
|
||||||
var commandCompletionInputChanged;
|
var commandCompletionInputChanged;
|
||||||
$scope.completeCommand = function(direction) {
|
$scope.completeCommand = function(direction) {
|
||||||
|
if (models.version[0] < 2 || (models.version[0] == 2 && models.version[1] < 9)) {
|
||||||
|
// Command completion is only supported on WeeChat 2.9+
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !$scope.command.startsWith('/') ) {
|
if ( !$scope.command.startsWith('/') ) {
|
||||||
// We are not completing a command, maybe a nick?
|
// We are not completing a command, maybe a nick?
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user