Fix crash on "Copy Binary Content" command without selection on edit zone
Fix also an issue that the word where the cursor is on in the edit zone is selected after running ABOUT box, that makes all the occurence of same word highlighted in the edit zone. Fix #11639, fix 11671, close #11673pull/11694/head
parent
def3aba4e6
commit
df438ea944
|
@ -373,7 +373,7 @@ void Notepad_plus::command(int id)
|
|||
case IDM_EDIT_COPY_BINARY:
|
||||
case IDM_EDIT_CUT_BINARY:
|
||||
{
|
||||
size_t textLen = _pEditView->execute(SCI_GETSELTEXT, 0, 0) - 1;
|
||||
size_t textLen = _pEditView->execute(SCI_GETSELTEXT, 0, 0);
|
||||
if (!textLen)
|
||||
return;
|
||||
|
||||
|
@ -3160,8 +3160,8 @@ void Notepad_plus::command(int id)
|
|||
{
|
||||
bool doAboutDlg = false;
|
||||
const int maxSelLen = 32;
|
||||
auto textLen = _pEditView->execute(SCI_GETSELTEXT, 0, 0) - 1;
|
||||
if (!textLen)
|
||||
auto textLen = _pEditView->execute(SCI_GETSELTEXT, 0, 0);
|
||||
if (textLen <= 0)
|
||||
doAboutDlg = true;
|
||||
if (textLen > maxSelLen)
|
||||
doAboutDlg = true;
|
||||
|
|
Loading…
Reference in New Issue