Jelajahi Sumber

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.
ronak69 1 tahun lalu
induk
melakukan
49467c6ec2
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Userland/Libraries/LibVT/TerminalWidget.cpp

+ 1 - 1
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<Core::Timer>();