]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fix alt+a for multiple hilight levels.
authorChris Porter <redacted>
Mon, 20 Oct 2008 19:05:54 +0000 (20:05 +0100)
committerChris Porter <redacted>
Mon, 20 Oct 2008 19:05:54 +0000 (20:05 +0100)
js/ui/baseui.js

index 796929e2bb576b3d116a4b61c6469421c6aa1b59..ed05624d0547e18b791bc50b9057b51e41ebca59 100644 (file)
@@ -102,13 +102,18 @@ qwebirc.ui.StandardUI = new Class({
         return;
         
       if(x.key == "a" || x.key == "A") {
+        var highestNum = 0;
+        var highestIndex = -1;
         new Event(x).stop();
         for(var i=0;i<this.windowArray.length;i++) {
-          if(this.windowArray[i].hilighted) {
-            this.selectWindow(this.windowArray[i]);
-            break;
+          var h = this.windowArray[i].hilighted;
+          if(h > highestNum) {
+            highestIndex = i;
+            highestNum = h;
           }
         }
+        if(highestIndex > -1)
+          this.selectWindow(this.windowArray[highestIndex]);
       } else if(x.key >= '0' && x.key <= '9') {
         new Event(x).stop();