From 0c1bd0da13ec070f52f3144b50868fb4153471e5 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 12 Sep 2015 23:42:01 -0700 Subject: linenoise: support completion in the middle of line. * linenoise/linenoise.c (compare_completions): Restructure with help of new lino_copy function to collect completions just for the prefix of the line up to the cursor position, and recombine those with the suffix. * txr.1: Doc updated. --- txr.1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index c7cf6171..c725465d 100644 --- a/txr.1 +++ b/txr.1 @@ -33601,13 +33601,11 @@ in that directory, then the history isn't saved. .NP* Symbolic Completion If the Tab key is pressed while editing a line, it is interpreted as a -request for completion. This only happens if the cursor is at the end -of the line (to the right of the rightmost character); completion in -the middle of a line is not supported. +request for completion. When completion is invoked with the Tab key, the listener looks at a few of the -trailing characters of the line in order to determine the applicable list of -completions. Completions are determined from among the \*(TL symbols which have +trailing characters to the left of the cursor position to determine the +applicable list of completions. Completions are determined from among the \*(TL symbols which have global variable, function, macro and symbolic macro bindings. Symbols which have operator binding are also taken into consideration. If a package-qualified symbol is completed, then completion is restricted to that -- cgit v1.2.3