Fix Monitoring not scrolling to the last line with word wrap enabled

Fix #8850, close #8851
This commit is contained in:
jofon 2020-09-12 01:18:10 +01:00 committed by Don HO
parent c607e427fc
commit c5e594e3ea

View File

@ -5239,12 +5239,14 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
// not only test main view // not only test main view
if (buffer == _mainEditView.getCurrentBuffer()) if (buffer == _mainEditView.getCurrentBuffer())
{ {
_mainEditView.execute(SCI_GOTOLINE, _mainEditView.execute(SCI_GETLINECOUNT) - 1); _mainEditView.setPositionRestoreNeeded(false);
_mainEditView.execute(SCI_DOCUMENTEND);
} }
// but also test sub-view, because the buffer could be clonned // but also test sub-view, because the buffer could be clonned
if (buffer == _subEditView.getCurrentBuffer()) if (buffer == _subEditView.getCurrentBuffer())
{ {
_subEditView.execute(SCI_GOTOLINE, _subEditView.execute(SCI_GETLINECOUNT) - 1); _subEditView.setPositionRestoreNeeded(false);
_subEditView.execute(SCI_DOCUMENTEND);
} }
break; break;