mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
LibLine: Respect the provided completion static offset
Now that we can resolve these correctly and they're per-suggestion, we can finally use them for their intended purpose of letting suggestions overwrite stuff in the buffer.
This commit is contained in:
parent
4ea9ca06b4
commit
d5b3998d23
5 changed files with 27 additions and 9 deletions
|
@ -1474,7 +1474,7 @@ Vector<Line::CompletionSuggestion> Shell::complete_path(StringView base, StringV
|
|||
// since we are not suggesting anything starting with
|
||||
// `/foo/', but rather just `bar...'
|
||||
auto token_length = escape_token(token, escape_mode).length();
|
||||
size_t static_offset = last_slash + 1;
|
||||
size_t static_offset = 0;
|
||||
auto invariant_offset = token_length;
|
||||
if (m_editor)
|
||||
m_editor->transform_suggestion_offsets(invariant_offset, static_offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue