summaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-10 06:10:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-10 06:10:17 -0700
commitd6ad5b6d3c5102dc7837bae1ae8f5528fa7b68b6 (patch)
tree6d1fbfffca3ca28a8f27723a3c9dbe21eedd22c3 /parser.c
parent90248a5919960a3bc0ffad65bd22bbdc9d227d5b (diff)
downloadtxr-d6ad5b6d3c5102dc7837bae1ae8f5528fa7b68b6.tar.gz
txr-d6ad5b6d3c5102dc7837bae1ae8f5528fa7b68b6.tar.bz2
txr-d6ad5b6d3c5102dc7837bae1ae8f5528fa7b68b6.zip
linenoise: sort completions by length.
Give the shorter completions first, and lexicographically within each length equivalence class. This effectively gives the user a breadth-first search through the trie of possible suffixes. * linenoise/linenoise.c (compare_completions): New static function. (complete_line): Apply qsort to the collected vector of strings. Easy does it.
Diffstat (limited to 'parser.c')
0 files changed, 0 insertions, 0 deletions