- fix: Issue #230 Crash when input " in the txt files.

This commit is contained in:
Roy Qu 2024-03-03 12:31:24 +08:00
parent 907aa41a8e
commit 804ff6085e
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@ Red Panda C++ Version 2.27
- fix: issue #215 (Caret may be drawn in the gutter.)
- change: Force use utf8 as the exec encoding for fmtlib in the auto link options page.
- fix: After spaces in comments and strings, symbol completion for '{' and '(' are wrong.
- fix: Issue #230 Crash when input " in the txt files.
Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors.

View File

@ -2957,7 +2957,10 @@ bool Editor::handleDoubleQuoteCompletion()
endEditing();
return true;
}
if ((ch == 0) || syntaxer()->isWordBreakChar(ch) || syntaxer()->isSpaceChar(ch)) {
if ((ch == 0)
|| !syntaxer()
|| ( syntaxer()->isWordBreakChar(ch)
|| syntaxer()->isSpaceChar(ch))) {
// insert ""
beginEditing();
processCommand(QSynedit::EditCommand::Char,'"');