svn commit: r259830 - head/sys/kern
Ed Schouten
ed at FreeBSD.org
Tue Dec 24 18:42:27 UTC 2013
Author: ed
Date: Tue Dec 24 18:42:26 2013
New Revision: 259830
URL: http://svnweb.freebsd.org/changeset/base/259830
Log:
Fix copy-pasting of CJK fullwidth characters.
They are stored as two separate characters in the vtbuf, so copy-pasting
will cause them to be passed to terminal_input_char() twice. Extend
terminal_input_char() to explicitly discard characters with TF_CJK_RIGHT
set. This causes only the left part to generate input.
Modified:
head/sys/kern/subr_terminal.c
Modified: head/sys/kern/subr_terminal.c
==============================================================================
--- head/sys/kern/subr_terminal.c Tue Dec 24 18:41:17 2013 (r259829)
+++ head/sys/kern/subr_terminal.c Tue Dec 24 18:42:26 2013 (r259830)
@@ -249,7 +249,13 @@ terminal_input_char(struct terminal *tm,
if (tp == NULL)
return;
- /* Strip off any attributes. */
+ /*
+ * Strip off any attributes. Also ignore input of second part of
+ * CJK fullwidth characters, as we don't want to return these
+ * characters twice.
+ */
+ if (TCHAR_FORMAT(c) & TF_CJK_RIGHT)
+ return;
c = TCHAR_CHARACTER(c);
tty_lock(tp);
More information about the svn-src-all
mailing list