- fix: correctly updates cursor position when pasting from clipboard
This commit is contained in:
parent
92cc00da54
commit
75cb4c9b5a
|
@ -3476,6 +3476,7 @@ void SynEdit::onSizeOrFontChanged(bool bFont)
|
||||||
if (mCharWidth != 0) {
|
if (mCharWidth != 0) {
|
||||||
mCharsInWindow = std::max(clientWidth() - mGutterWidth - 2, 0) / mCharWidth;
|
mCharsInWindow = std::max(clientWidth() - mGutterWidth - 2, 0) / mCharWidth;
|
||||||
mLinesInWindow = clientHeight() / mTextHeight;
|
mLinesInWindow = clientHeight() / mTextHeight;
|
||||||
|
bool scrollBarChangedSettings = mStateFlags.testFlag(SynStateFlag::sfScrollbarChanged);
|
||||||
if (bFont) {
|
if (bFont) {
|
||||||
if (mGutter.showLineNumbers())
|
if (mGutter.showLineNumbers())
|
||||||
onGutterChanged();
|
onGutterChanged();
|
||||||
|
@ -3485,7 +3486,7 @@ void SynEdit::onSizeOrFontChanged(bool bFont)
|
||||||
invalidate();
|
invalidate();
|
||||||
} else
|
} else
|
||||||
updateScrollbars();
|
updateScrollbars();
|
||||||
mStateFlags.setFlag(SynStateFlag::sfScrollbarChanged,false);
|
mStateFlags.setFlag(SynStateFlag::sfScrollbarChanged,scrollBarChangedSettings);
|
||||||
//if (!mOptions.testFlag(SynEditorOption::eoScrollPastEol))
|
//if (!mOptions.testFlag(SynEditorOption::eoScrollPastEol))
|
||||||
setLeftChar(mLeftChar);
|
setLeftChar(mLeftChar);
|
||||||
//if (!mOptions.testFlag(SynEditorOption::eoScrollPastEof))
|
//if (!mOptions.testFlag(SynEditorOption::eoScrollPastEof))
|
||||||
|
|
Loading…
Reference in New Issue