diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-10 06:10:17 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-10 06:10:17 -0700 |
commit | d6ad5b6d3c5102dc7837bae1ae8f5528fa7b68b6 (patch) | |
tree | 6d1fbfffca3ca28a8f27723a3c9dbe21eedd22c3 /parser.c | |
parent | 90248a5919960a3bc0ffad65bd22bbdc9d227d5b (diff) | |
download | txr-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