Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[Bug 19145] SE can cut chars from end handler struct #2110

Open
wants to merge 2 commits into
base: develop-9.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,13 @@ private function textFormatIndentLineRemoves pPreviousLine, pLine
# OK-2009-02-16 : Bug 7707 - We can't assume the previous line was correctly formatted or script may be deleted.
# Instead we simplify this by simply chopping off whatever indentation it did have.
--return min(-(the number of chars of textFormatGetLineIndent(pPreviousLine)), item 1 of sTextFormatKeywordMap[tToken])
return item 1 of sTextFormatKeywordMap["end"]
--return item 1 of sTextFormatKeywordMap["end"]

if token 1 of pPreviousLine is among the items of (handlerTypes() & ",private") then
return item 1 of sTextFormatKeywordMap["end"]
else
return max(-(the number of chars of textFormatGetLineIndent(pPreviousLine)), item 1 of sTextFormatKeywordMap[tToken])
end if
else
# We can't assume that the previous line was correctly indented
# because the script might have been edited from outside this script editor. Therefore
Expand Down
1 change: 1 addition & 0 deletions notes/bugfix-19145.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# fix cutting chars from "end handler" struct in certain circumstances