Enhance "Go To" dialog: update line/position data dynamically

Fix #12284, close #12302
This commit is contained in:
Anklebitter 2022-10-07 16:05:36 -07:00 committed by Don Ho
parent a26599794c
commit 49e5a17377
2 changed files with 7 additions and 2 deletions

View File

@ -3873,6 +3873,11 @@ void Notepad_plus::updateStatusBar()
_statusBar.setText(strLnColSel, STATUSBAR_CUR_POS);
_statusBar.setText(_pEditView->execute(SCI_GETOVERTYPE) ? TEXT("OVR") : TEXT("INS"), STATUSBAR_TYPING_MODE);
if (_goToLineDlg.isCreated() && _goToLineDlg.isVisible())
{
_goToLineDlg.updateLinesNumbers();
}
}
void Notepad_plus::dropFiles(HDROP hdrop)

View File

@ -46,6 +46,8 @@ public :
if (toShow)
::SetFocus(::GetDlgItem(_hSelf, ID_GOLINE_EDIT));
};
void updateLinesNumbers() const;
protected :
enum mode {go2line, go2offsset};
@ -55,8 +57,6 @@ protected :
private :
ScintillaEditView **_ppEditView = nullptr;
void updateLinesNumbers() const;
void cleanLineEdit() const {
::SetDlgItemText(_hSelf, ID_GOLINE_EDIT, TEXT(""));
};