From 49467c6ec2cede1b468b8380798d83fbb8168035 Mon Sep 17 00:00:00 2001 From: ronak69 Date: Mon, 29 Jan 2024 11:12:15 +0000 Subject: [PATCH] LibVT: Write emoji to the pseudo-terminal master fd on emoji input ... instead of inserting it into the current output character stream that the terminal widget is going to render. This ensures that the emoji gets sent to the foreground process of the terminal. --- Userland/Libraries/LibVT/TerminalWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibVT/TerminalWidget.cpp b/Userland/Libraries/LibVT/TerminalWidget.cpp index d5f047bb99..5de996a4cd 100644 --- a/Userland/Libraries/LibVT/TerminalWidget.cpp +++ b/Userland/Libraries/LibVT/TerminalWidget.cpp @@ -97,7 +97,7 @@ TerminalWidget::TerminalWidget(int ptm_fd, bool automatic_size_policy) set_pty_master_fd(ptm_fd); on_emoji_input = [this](auto emoji) { - inject_string(emoji); + emit(emoji.bytes().data(), emoji.length()); }; m_cursor_blink_timer = add();