Limit tab completion to text before the cursor

`substr` takes a count, so the text after the cursor joined the prefix.
This commit is contained in:
noctuum
2026-09-27 22:39:35 +05:00
committed by Jari Sundell
parent 9f6fd7994e
commit e656801cfa
4 changed files with 104 additions and 1 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ PathInput::receive_do_complete() {
entry.s_name += '/';
}
range_type r = find_incomplete(dir, str().substr(dirEnd, get_pos()));
range_type r = find_incomplete(dir, str().substr(dirEnd, get_pos() - dirEnd));
if (r.first == r.second)
return; // Show some nice colors here.