From 12f080f478307aa1c03dd73dd702c236aa265877 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Mon, 30 Jan 2006 05:52:58 +0000
Subject: [PATCH] Expand on comment. Only use K_GETSTR if
 user.settings&USER_SPIN (To avoid triple the ESC delay when not necessary)

---
 exec/load/lightbar.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec/load/lightbar.js b/exec/load/lightbar.js
index a8fe32a2a0..84be6b3c39 100644
--- a/exec/load/lightbar.js
+++ b/exec/load/lightbar.js
@@ -343,9 +343,10 @@ function Lightbar_getval(current)
 		/* Get input */
 		/*
 		 * ToDo: K_GETSTR is to ensure that the users SPIN mode isn't used
-		 * This is a hack.
+		 * This is a hack which triples the time that an ESC takes to be
+		 * procesed.
 		 */
-		var key=console.getkey(K_UPPER|K_GETSTR);
+		var key=console.getkey(K_UPPER|(user.settings&USER_SPIN?K_GETSTR:0));
 		if(this.hotkeys.indexOf(key)!=-1)
 			return(key);
 		switch(key) {
-- 
GitLab