- fix: Caret unseen when move to a long line end by press END.
This commit is contained in:
parent
92407fc767
commit
bcbcc61481
1
NEWS.md
1
NEWS.md
|
@ -61,6 +61,7 @@ Red Panda C++ Version 2.27
|
|||
- enhancement: "Mouse scroll direction" option in Options / Editor / General
|
||||
- change: Invert scroll direction in horizontal, like in vertical.
|
||||
- enhancement: Show type completion info after 'const' and 'volatile'
|
||||
- fix: Caret unseen when move to a long line end by press END.
|
||||
|
||||
Red Panda C++ Version 2.26
|
||||
- enhancement: Code suggestion for embedded std::vectors.
|
||||
|
|
|
@ -266,14 +266,14 @@ void QSynEdit::setCaretXYEx(bool CallEnsureCursorPosVisible, BufferCoord value)
|
|||
if (CallEnsureCursorPosVisible)
|
||||
ensureCursorPosVisible();
|
||||
} else {
|
||||
// Also call UpdateLastCaretX if the caret didn't move. Apps don't know
|
||||
// anything about fLastCaretX and they shouldn't need to. So, to avoid any
|
||||
// unwanted surprises, always update fLastCaretX whenever CaretXY is
|
||||
// assigned to.
|
||||
// Note to SynEdit developers: If this is undesirable in some obscure
|
||||
// case, just save the value of fLastCaretX before assigning to CaretXY and
|
||||
// restore it afterward as appropriate.
|
||||
updateLastCaretX();
|
||||
// Also call UpdateLastCaretX if the caret didn't move. Apps don't know
|
||||
// anything about fLastCaretX and they shouldn't need to. So, to avoid any
|
||||
// unwanted surprises, always update fLastCaretX whenever CaretXY is
|
||||
// assigned to.
|
||||
// Note to SynEdit developers: If this is undesirable in some obscure
|
||||
// case, just save the value of fLastCaretX before assigning to CaretXY and
|
||||
// restore it afterward as appropriate.
|
||||
updateLastCaretX();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3063,8 +3063,8 @@ void QSynEdit::ensureCursorPosVisibleEx(bool ForceToMiddle)
|
|||
int visibleX = displayX();
|
||||
if (visibleX < leftPos())
|
||||
setLeftPos(visibleX);
|
||||
else if (visibleX >= viewWidth() + leftPos() && viewWidth()>0)
|
||||
setLeftPos(visibleX - viewWidth() + 1);
|
||||
else if (visibleX > viewWidth() + leftPos() && viewWidth()>0)
|
||||
setLeftPos(visibleX - viewWidth() + mCharWidth);
|
||||
else
|
||||
setLeftPos(leftPos());
|
||||
// Make sure Y is visible
|
||||
|
|
Loading…
Reference in New Issue