From bcbe25861980ac2f5fc7022306685d0e89e5ecd1 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 28 Mar 2022 21:53:12 +0430 Subject: LibCore: Set the correct invariant length for consecutive short options When completing `ls -l` to add another short option, the invariant length should be zero as we are not replacing anything with our suggestion. Also skip the initial dash if there already is one. Fixes #13301. --- Userland/Libraries/LibCore/ArgsParser.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibCore/ArgsParser.cpp b/Userland/Libraries/LibCore/ArgsParser.cpp index e351cf46b4..a339b8a0bd 100644 --- a/Userland/Libraries/LibCore/ArgsParser.cpp +++ b/Userland/Libraries/LibCore/ArgsParser.cpp @@ -753,11 +753,11 @@ void ArgsParser::autocomplete(FILE* file, StringView program_name, Span