[polari] tabCompletion: Rename variable isIRCCommand to isCommand



commit cc9336979bd94ea3714db952037c2c05f48ff0fc
Author: Kunaal Jain <kunaalus gmail com>
Date:   Wed Feb 17 02:10:11 2016 +0530

    tabCompletion: Rename variable isIRCCommand to isCommand
    
    It's quite clear from context, that by command, we mean
    IRC command. Other variables in tabCompletion use Command
    instead of IRCCommand, so rename the variable isIRCCommand
    to isCommand.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=761304

 src/tabCompletion.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/tabCompletion.js b/src/tabCompletion.js
index eebe3e7..a4f1cfe 100644
--- a/src/tabCompletion.js
+++ b/src/tabCompletion.js
@@ -161,9 +161,9 @@ const TabCompletion = new Lang.Class({
     },
 
     _getRowCompletion: function(row) {
-        this._previousWasCommand = this._isIRCCommand;
+        this._previousWasCommand = this._isCommand;
 
-        if (this._isIRCCommand)
+        if (this._isCommand)
             return row._text + ' ';
         if (this._startPos == 0 || this._isChained)
             return row._text + ': ';
@@ -204,7 +204,7 @@ const TabCompletion = new Lang.Class({
         this._startPos = text.lastIndexOf(' ') + 1;
         this._key = text.toLowerCase().substr(this._startPos);
 
-        this._isIRCCommand = this._key.startsWith('/');
+        this._isCommand = this._key.startsWith('/');
 
         if (this._startPos == 0)
             this._endPos = -1;
@@ -212,7 +212,7 @@ const TabCompletion = new Lang.Class({
         // Chain completions if the current completion directly follows a previous one,
         // except when one of them was for an IRC command
         let previousCompletion = (this._endPos == this._startPos);
-        this._isChained = previousCompletion && !this._isIRCCommand && !this._previousWasCommand;
+        this._isChained = previousCompletion && !this._isCommand && !this._previousWasCommand;
 
         this._list.invalidate_filter();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]