mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +00:00
Shell: Provide the correct invariant length to the line editor
This commit is contained in:
parent
683a0696f3
commit
0fb4a808ef
1 changed files with 3 additions and 3 deletions
|
@ -1135,7 +1135,7 @@ int main(int argc, char** argv)
|
|||
// e.g. in `cd /foo/bar', 'bar' is the invariant
|
||||
// since we are not suggesting anything starting with
|
||||
// `/foo/', but rather just `bar...'
|
||||
editor.suggest(token_to_complete.length(), 0);
|
||||
editor.suggest(escape_token(token).length(), 0);
|
||||
|
||||
// only suggest dot-files if path starts with a dot
|
||||
Core::DirIterator files(path,
|
||||
|
@ -1185,7 +1185,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
suggestions.append({ cached_path[index], " " });
|
||||
|
||||
editor.suggest(token_to_complete.length(), 0);
|
||||
editor.suggest(escape_token(token).length(), 0);
|
||||
|
||||
return suggestions;
|
||||
};
|
||||
|
@ -1216,7 +1216,7 @@ int main(int argc, char** argv)
|
|||
// e.g. in `cd /foo/bar', 'bar' is the invariant
|
||||
// since we are not suggesting anything starting with
|
||||
// `/foo/', but rather just `bar...'
|
||||
editor.suggest(token_to_complete.length(), 0);
|
||||
editor.suggest(escape_token(token).length(), 0);
|
||||
|
||||
// only suggest dot-files if path starts with a dot
|
||||
Core::DirIterator files(path,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue