- Enhancement: Don't auto-indent in raw string.
This commit is contained in:
parent
d8e4c4d76b
commit
0faea6ac69
1
NEWS.md
1
NEWS.md
|
@ -44,6 +44,7 @@ Red Panda C++ Version 2.26
|
|||
- Fix: Force to use debug server when debugging with lldb-mi to fix input/output on Windows.
|
||||
- Fix: Can't goto definition/declaration into files that not saved.
|
||||
- Fix: Expression that starts with full scoped variables might be treated as var definition.
|
||||
- Enhancement: Don't auto-indent in raw string.
|
||||
|
||||
Red Panda C++ Version 2.25
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ namespace QSynedit {
|
|||
if (editor->syntaxer()->language() != ProgrammingLanguage::CPP)
|
||||
return indentSpaces;
|
||||
SyntaxState rangePreceeding = editor->document()->getSyntaxState(startLine-1);
|
||||
if (rangePreceeding.state == CppSyntaxer::RangeState::rsRawStringNotEscaping)
|
||||
return 0;
|
||||
if (addIndent) {
|
||||
// QString trimmedS = s.trimmed();
|
||||
QString trimmedLineText = lineText.trimmed();
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace QSynedit {
|
|||
|
||||
class CppSyntaxer: public Syntaxer
|
||||
{
|
||||
public:
|
||||
enum class TokenId {
|
||||
Comment,
|
||||
Directive,
|
||||
|
@ -53,7 +54,6 @@ class CppSyntaxer: public Syntaxer
|
|||
rsDefineIdentifier, rsDefineRemaining,
|
||||
};
|
||||
|
||||
public:
|
||||
explicit CppSyntaxer();
|
||||
CppSyntaxer(const CppSyntaxer&)=delete;
|
||||
CppSyntaxer operator=(const CppSyntaxer&)=delete;
|
||||
|
|
Loading…
Reference in New Issue