From 8e26e08c1cf799c632c3cdc067804ed128f6e743 Mon Sep 17 00:00:00 2001 From: Alan Kilborn Date: Sat, 24 Aug 2024 06:47:39 -0400 Subject: [PATCH] Simplify Python smart indent regex Fix #15573, close #15574 --- PowerEditor/src/Notepad_plus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 9462761f3d3f..b025ebb3c441 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3769,7 +3769,7 @@ void Notepad_plus::maintainIndentation(wchar_t ch) _pEditView->execute(SCI_SETTARGETRANGE, startPos, endPos); // colon optionally followed by only whitespace and/or start-of-comment, but NOT on a line that is already a comment - const char colonExpr[] = "^[^#]*\\K:[ \t]*(#|$)"; + const char colonExpr[] = ":[ \t]*(#|$)"; auto posColon = _pEditView->execute(SCI_SEARCHINTARGET, strlen(colonExpr), reinterpret_cast(colonExpr));