mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 23:05:13 +02:00
Fix disabled Paste command with no previous text-data in clipboard
Previously, a Notepad++ editor user activity or focus switching was needed for enabling possible clipboard Paste after a successful Copy command. Fix #16456, close #16458
This commit is contained in:
parent
51449b09de
commit
13b08d0a5c
@ -379,6 +379,7 @@ void Notepad_plus::command(int id)
|
|||||||
{
|
{
|
||||||
::SendMessage(focusedHwnd, WM_CUT, 0, 0);
|
::SendMessage(focusedHwnd, WM_CUT, 0, 0);
|
||||||
}
|
}
|
||||||
|
checkClipboard(); // for enabling possible Paste command
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,7 +396,6 @@ void Notepad_plus::command(int id)
|
|||||||
{
|
{
|
||||||
_pEditView->execute(SCI_COPYALLOWLINE); // Copy without selected text, it will copy the whole line with EOL, for pasting before any line where the caret is.
|
_pEditView->execute(SCI_COPYALLOWLINE); // Copy without selected text, it will copy the whole line with EOL, for pasting before any line where the caret is.
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -405,7 +405,7 @@ void Notepad_plus::command(int id)
|
|||||||
else
|
else
|
||||||
::SendMessage(focusedHwnd, WM_COPY, 0, 0);
|
::SendMessage(focusedHwnd, WM_COPY, 0, 0);
|
||||||
}
|
}
|
||||||
|
checkClipboard(); // for enabling possible Paste command
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,6 +499,8 @@ void Notepad_plus::command(int id)
|
|||||||
|
|
||||||
if (id == IDM_EDIT_CUT_BINARY)
|
if (id == IDM_EDIT_CUT_BINARY)
|
||||||
_pEditView->execute(SCI_REPLACESEL, 0, reinterpret_cast<LPARAM>(""));
|
_pEditView->execute(SCI_REPLACESEL, 0, reinterpret_cast<LPARAM>(""));
|
||||||
|
|
||||||
|
checkClipboard(); // for enabling possible Paste command
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user