diff --git a/NEWS.md b/NEWS.md index 672b16b7..a827adff 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 4b53f09d..6a621146 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -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,'"');