vt: selection: take screen contents from uniscr if available
authorAdam Borowski <kilobyte@angband.pl>
Wed, 18 Jul 2018 02:10:44 +0000 (04:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jul 2018 07:18:27 +0000 (09:18 +0200)
commit9bfdc2611d417be453c3deb7a7ef2ffc718febfa
treee3d733f3f44be5063833069d2d8f297ce6d7c2a4
parentdf155d2d8cbfe83073bad818b26c28eb3e1a6c91
vt: selection: take screen contents from uniscr if available

This preserves whatever was written even if we can't currently display the
given glyph.  Mouse paste won't corrupt any character of wcwidth() == 1
anymore.

Note that for now uniscr doesn't get allocated until something reads
/dev/vcsuN for that console, making this code dormant for most users.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/selection.c
drivers/tty/vt/vt.c
include/linux/selection.h