浏览代码

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 年之前
父节点
当前提交
49467c6ec2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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);
     set_pty_master_fd(ptm_fd);
 
 
     on_emoji_input = [this](auto emoji) {
     on_emoji_input = [this](auto emoji) {
-        inject_string(emoji);
+        emit(emoji.bytes().data(), emoji.length());
     };
     };
 
 
     m_cursor_blink_timer = add<Core::Timer>();
     m_cursor_blink_timer = add<Core::Timer>();