summaryrefslogtreecommitdiff
path: root/Userland/Shell/Shell.cpp
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-04-15 01:48:56 +0430
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-04-18 19:53:10 +0430
commitd5b3998d23775cc9ff12bf7c766b1f1411450f4b (patch)
tree9514a83b27294c6709b1a46843f3a48a25ed55e9 /Userland/Shell/Shell.cpp
parent4ea9ca06b4fdd710a72bc244f2f0d23c2d52e8de (diff)
downloadserenity-d5b3998d23775cc9ff12bf7c766b1f1411450f4b.zip
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.
Diffstat (limited to 'Userland/Shell/Shell.cpp')
-rw-r--r--Userland/Shell/Shell.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Shell/Shell.cpp b/Userland/Shell/Shell.cpp
index fdcaa68e9b..95a22f9935 100644
--- a/Userland/Shell/Shell.cpp
+++ b/Userland/Shell/Shell.cpp
@@ -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);