mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
committed by
Ali Mohammad Pur
parent
4ea9ca06b4
commit
d5b3998d23
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user