mbox series

[v3,0/2] vt: bracketed paste and cursor position

Message ID 20250520171851.1219676-1-nico@fluxnic.net
Headers show
Series vt: bracketed paste and cursor position | expand

Message

Nicolas Pitre May 20, 2025, 5:16 p.m. UTC
A different kind of VT console update this time. These patches:

- add bracketed paste support to the VT console

- overcome a /dev/vcsa limitation with cursor position retrieval

In v1 those were submitted together to avoid merge conflicts. Those conflicts
no longer exist but here they are together again for coherence sake.

Changes from v1 (https://lore.kernel.org/all/20250514015554.19978-1-nico@fluxnic.net):

- Changed TIOCL_GETCURSORPOS to VT_GETCONSIZECSRPOS with proper structure.
  Moved to the VT_ space to benefit from unambigous pointer argument and
  vt_compat_ioctl() wrapper. Also motivated by the fact that usage require
  both display size and cursor position so those are joined in one syscall.
- Code simplifications suggested by Jiri.

Changes from v2 (https://lore.kernel.org/all/20250514194710.6709-1-nico@fluxnic.net):

- Define VT_GETCONSIZECSRPOS using _IOR().
- Replace unsigned short with __u16 in struct vt_consizecsrpos.

diffstat:
 drivers/tty/vt/selection.c     | 31 +++++++++++++++++++++++++++----
 drivers/tty/vt/vt.c            | 15 +++++++++++++++
 drivers/tty/vt/vt_ioctl.c      | 16 ++++++++++++++++
 include/linux/console_struct.h |  1 +
 include/uapi/linux/tiocl.h     |  1 +
 include/uapi/linux/vt.h        | 11 +++++++++++
 6 files changed, 71 insertions(+), 4 deletions(-)