From 7db271111c5e6e9fbe14145fc38cbfbd2b7c0333 Mon Sep 17 00:00:00 2001 From: Jan Sundermeyer Date: Sat, 2 Mar 2024 09:05:09 +0100 Subject: [PATCH] fix #3544 --- src/latexcompleter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/latexcompleter.cpp b/src/latexcompleter.cpp index 026dfa2552..b2ea01b4fe 100644 --- a/src/latexcompleter.cpp +++ b/src/latexcompleter.cpp @@ -836,8 +836,10 @@ bool CompletionListModel::isNextCharPossible(const QChar &c) LatexCompleter::config->caseSensitive == LatexCompleterConfig::CCS_CASE_SENSITIVE) cs = Qt::CaseSensitive; QString extension = curWord + c; - foreach (const CompletionWord &cw, words) - if (cw.word.startsWith(extension, cs)) return true; + foreach (const CompletionWord &cw, words){ + // disregard spaces at the end of the word for assuming a word was entered completely (#3544) + if (cw.word.trimmed().startsWith(extension, cs)) return true; + } return false; }