- fix: Caret unseen when move to a long line end by press END.

This commit is contained in:
Roy Qu 2024-03-20 20:42:20 +08:00
parent 92407fc767
commit bcbcc61481
2 changed files with 11 additions and 10 deletions

View File

@ -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.

View File

@ -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