Make current line/position copiable in Go to line dialog

Fix #15950
This commit is contained in:
Don Ho 2025-01-13 09:54:16 +01:00
parent d7ddb6ea3a
commit 26c3008525
4 changed files with 8 additions and 5 deletions

View File

@ -111,7 +111,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// return value: The number of files in XML session file
#define NPPM_GETSESSIONFILES (NPPMSG + 14)
// NPPM_GETSESSIONFILES (wchar_t** sessionFileArray, wchar_t* sessionFileName)
// BOOL NPPM_GETSESSIONFILES (wchar_t** sessionFileArray, wchar_t* sessionFileName)
// the files' full path name from a session file.
// wParam[out]: sessionFileArray is the array in which the files' full path of the same group are written. To allocate the array with the proper size, send message NPPM_GETNBSESSIONFILES.
// lParam[in]: sessionFileName is XML session full path
@ -974,7 +974,7 @@ enum Platform { PF_UNKNOWN, PF_X86, PF_X64, PF_IA64, PF_ARM64 };
// Note: there's no symetric command NPPM_SETTABCOLORID. Plugins can use NPPM_MENUCOMMAND to set current tab color with the desired tab color ID.
#define NPPM_SETUNTITLEDNAME (NPPMSG + 115)
// int NPPM_SETUNTITLEDNAME(BufferID id, const wchar_t* newName)
// BOOL NPPM_SETUNTITLEDNAME(BufferID id, const wchar_t* newName)
// Rename the tab name for an untitled tab.
// wParam[in]: id - BufferID of the tab. -1 for currently active tab
// lParam[in]: newName - the desired new name of the tab

View File

@ -1431,7 +1431,10 @@ BEGIN
CONTROL "&Line",IDC_RADIO_GOTOLINE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,5,80,10
CONTROL "&Offset",IDC_RADIO_GOTOOFFSET,"Button",BS_AUTORADIOBUTTON,98,5,80,10
LTEXT "You are here:",ID_URHERE_STATIC,8,25,95,8
LTEXT "0123456789",ID_CURRLINE,106,25,45,8
//LTEXT "0123456789",ID_CURRLINE,106,25,45,8
EDITTEXT ID_CURRLINE_EDIT,104,24,71,12,ES_NUMBER | ES_READONLY
LTEXT "You want to &go to:",ID_UGO_STATIC,8,40,95,8
EDITTEXT ID_GOLINE_EDIT,104,38,71,12,ES_NUMBER
LTEXT "You can't go further than:",ID_NOMORETHAN_STATIC,8,55,95,8

View File

@ -171,6 +171,6 @@ void GoToLineDlg::updateLinesNumbers() const
limit = (currentDocLength > 0 ? currentDocLength - 1 : 0);
}
::SetDlgItemTextA(_hSelf, ID_CURRLINE, std::to_string(current).c_str());
::SetDlgItemTextA(_hSelf, ID_CURRLINE_EDIT, std::to_string(current).c_str());
::SetDlgItemTextA(_hSelf, ID_LASTLINE, std::to_string(limit).c_str());
}

View File

@ -558,7 +558,7 @@
#define IDD_GOLINE 2000
#define ID_GOLINE_EDIT (IDD_GOLINE + 1)
#define ID_CURRLINE (IDD_GOLINE + 2)
#define ID_CURRLINE_EDIT (IDD_GOLINE + 2)
#define ID_LASTLINE (IDD_GOLINE + 3)
#define ID_URHERE_STATIC (IDD_GOLINE + 4)
#define ID_UGO_STATIC (IDD_GOLINE + 5)