mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
only start editing if input is empty
This commit is contained in:
1 parent
f941ad1bef
commit
03e617a146
3 files changed
+7
-1
No files matched your search
@@ -287,7 +287,7 @@ bool ChatWindow::OnInputSubmit(ChatSubmitParams data) {
|
||||
|
||||
bool ChatWindow::ProcessKeyEvent(GdkEventKey *e) {
|
||||
if (e->type != GDK_KEY_PRESS) return false;
|
||||
if (e->keyval == GDK_KEY_Up) {
|
||||
if (e->keyval == GDK_KEY_Up && !(e->state & GDK_SHIFT_MASK) && m_input->IsEmpty()) {
|
||||
const auto edit_id = m_chat->GetLastSentMessage();
|
||||
if (edit_id.has_value()) {
|
||||
StartEditing(*edit_id);
|
||||
|
||||
Reference in new issue
Block a user