From b6ede1c2a3e9eb37981cce81c8b728f622ce1429 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 7 Feb 2023 18:51:17 +0100 Subject: [PATCH] complete.cpp: re-use constant in try_complete_variable --- src/complete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/complete.cpp b/src/complete.cpp index c98e40acf..f536362bd 100644 --- a/src/complete.cpp +++ b/src/complete.cpp @@ -1203,7 +1203,7 @@ bool completer_t::try_complete_variable(const wcstring &str) { wchar_t c = str.at(in_pos); if (!valid_var_name_char(c)) { // This character cannot be in a variable, reset the dollar. - variable_start = -1; + variable_start = wcstring::npos; } switch (c) {