From 2b3a8e8de27a4598daabb6ad314e340fee141d56 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 19 Feb 2011 13:41:30 -0500
Subject: [PATCH] - Improve displaying of autocompletechars message

---
 program/js/app.js |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 712400a..31bf296 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3486,15 +3486,14 @@
     if (q == this.ksearch_value)
       return;
 
-    if (q.length < min) {
+    if (q.length && q.length < min) {
       if (!this.env.acinfo) {
-        var label = this.get_label('autocompletechars');
-        label = label.replace('$min', min);
-        this.env.acinfo = this.display_message(label);
+        this.env.acinfo = this.display_message(
+          this.get_label('autocompletechars').replace('$min', min));
       }
       return;
     }
-    else if (this.env.acinfo && q.length == min) {
+    else if (this.env.acinfo) {
       this.hide_message(this.env.acinfo);
     }
 

--
Gitblit v1.9.1