Skip to content

Commit

Permalink
- fix: Issue #230 Crash when input " in the txt files.
Browse files Browse the repository at this point in the history
  • Loading branch information
royqh1979 committed Mar 3, 2024
1 parent 907aa41 commit 804ff60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion RedPandaIDE/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,'"');
Expand Down

0 comments on commit 804ff60

Please sign in to comment.