only start editing if input is empty

This commit is contained in:
ouwou committed 2023-07-15 16:03:33 -04:00
1 parent f941ad1bef
commit 03e617a146
3 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -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);