summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-13 10:39:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-13 10:39:18 -0700
commit09d2998e5cf4587a466aeccd759c48b0c7eca1bc (patch)
tree11a3291c2c85cf0f24a9fdff58b19c7b103e5a85
parent25be867d0902db863686414f89e75ee0fedc1d22 (diff)
downloadtxr-09d2998e5cf4587a466aeccd759c48b0c7eca1bc.tar.gz
txr-09d2998e5cf4587a466aeccd759c48b0c7eca1bc.tar.bz2
txr-09d2998e5cf4587a466aeccd759c48b0c7eca1bc.zip
Don't supply trivial completion which matches prefix.
* parser.c (find_matching_syms): Don't add an entry into the history if it is a full match for the completion prefix, because in the UI in then looks as if nothing happened when Tab as pressed.
-rw-r--r--parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index 8719b03d..31db6aab 100644
--- a/parser.c
+++ b/parser.c
@@ -401,6 +401,9 @@ static void find_matching_syms(lino_completions_t *cpl,
break;
}
+ if (equal(name, prefix))
+ continue;
+
if (qualify)
comple = format(nil, lit("~a~a:~a"), line_prefix, pkg_name, name, nao);
else