aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authorMichael Heath <unknown>2022-11-28 17:59:01 +1100
committerMichael Heath <unknown>2022-11-28 17:59:01 +1100
commit8cedd574bc15453d86926a71f9a8197dc5fdb5ee (patch)
treede6d7211fe95248122e9595992537090fd9cd859 /src/Document.cxx
parenta179c1bd5f83c7b6c649fadbf98ffb2309e50adc (diff)
downloadscintilla-mirror-8cedd574bc15453d86926a71f9a8197dc5fdb5ee.tar.gz
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.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx5
1 files changed, 4 insertions, 1 deletions
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--;
}