From 8cedd574bc15453d86926a71f9a8197dc5fdb5ee Mon Sep 17 00:00:00 2001 From: Michael Heath Date: Mon, 28 Nov 2022 17:59:01 +1100 Subject: Bug [#2363]. Change 'paragraph up' commands SCI_PARAUP and SCI_PARAUPEXTEND to go to the start position of the paragraph containing the caret. Only if the caret is already at the start of the paragraph will it go to the start of the previous paragraph. --- src/Document.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index c67aae125..7afe10701 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1772,7 +1772,10 @@ bool Document::IsWhiteLine(Sci::Line line) const { Sci::Position Document::ParaUp(Sci::Position pos) const { Sci::Line line = SciLineFromPosition(pos); - line--; + const Sci::Position start = LineStart(line); + if (pos == start) { + line--; + } while (line >= 0 && IsWhiteLine(line)) { // skip empty lines line--; } -- cgit v1.2.3