Simplefy the commit 9387dcdaef
This commit is contained in:
parent
563530379f
commit
062ec3e726
@ -948,14 +948,8 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
|
||||
// Check if a restore position is needed.
|
||||
// Restoring a position must done after SCN_PAINTED notification so that it works in every circumstances (including wrapped large file)
|
||||
if (_mainEditView.isPositionRestoreNeeded())
|
||||
{
|
||||
_mainEditView.restoreCurrentPosPostStep();
|
||||
}
|
||||
if (_subEditView.isPositionRestoreNeeded())
|
||||
{
|
||||
_subEditView.restoreCurrentPosPostStep();
|
||||
}
|
||||
_mainEditView.restoreCurrentPosPostStep();
|
||||
_subEditView.restoreCurrentPosPostStep();
|
||||
|
||||
// ViewMoveAtWrappingDisableFix: Disable wrapping messes up visible lines.
|
||||
// Therefore save view position before in IDM_VIEW_WRAP and restore after SCN_PAINTED, as doc. says
|
||||
|
@ -1846,6 +1846,9 @@ void ScintillaEditView::restoreCurrentPosPreStep()
|
||||
// to scroll several lines to set the first visible line to the correct wrapped line.
|
||||
void ScintillaEditView::restoreCurrentPosPostStep()
|
||||
{
|
||||
if (!_positionRestoreNeeded)
|
||||
return;
|
||||
|
||||
static int32_t restoreDone = 0;
|
||||
Buffer * buf = MainFileManager.getBufferByID(_currentBufferID);
|
||||
Position & pos = buf->getPosition(this);
|
||||
|
@ -633,8 +633,6 @@ public:
|
||||
void setTabSettings(Lang *lang);
|
||||
bool isWrapRestoreNeeded() const {return _wrapRestoreNeeded;};
|
||||
void setWrapRestoreNeeded(bool isWrapRestoredNeeded) {_wrapRestoreNeeded = isWrapRestoredNeeded;};
|
||||
bool isPositionRestoreNeeded() const {return _positionRestoreNeeded;};
|
||||
|
||||
|
||||
bool isCJK() const {
|
||||
return ((_codepage == CP_CHINESE_TRADITIONAL) || (_codepage == CP_CHINESE_SIMPLIFIED) ||
|
||||
|
Loading…
Reference in New Issue
Block a user