- fix: correctly updates cursor position when pasting from clipboard

This commit is contained in:
royqh1979@gmail.com 2021-10-29 19:20:55 +08:00
parent 92cc00da54
commit 75cb4c9b5a
1 changed files with 2 additions and 1 deletions

View File

@ -3476,6 +3476,7 @@ void SynEdit::onSizeOrFontChanged(bool bFont)
if (mCharWidth != 0) {
mCharsInWindow = std::max(clientWidth() - mGutterWidth - 2, 0) / mCharWidth;
mLinesInWindow = clientHeight() / mTextHeight;
bool scrollBarChangedSettings = mStateFlags.testFlag(SynStateFlag::sfScrollbarChanged);
if (bFont) {
if (mGutter.showLineNumbers())
onGutterChanged();
@ -3485,7 +3486,7 @@ void SynEdit::onSizeOrFontChanged(bool bFont)
invalidate();
} else
updateScrollbars();
mStateFlags.setFlag(SynStateFlag::sfScrollbarChanged,false);
mStateFlags.setFlag(SynStateFlag::sfScrollbarChanged,scrollBarChangedSettings);
//if (!mOptions.testFlag(SynEditorOption::eoScrollPastEol))
setLeftChar(mLeftChar);
//if (!mOptions.testFlag(SynEditorOption::eoScrollPastEof))