summaryrefslogtreecommitdiff
path: root/include/linux/console_struct.h
diff options
context:
space:
mode:
authorCalixte Pernot <calixte.pernot@grenoble-inp.org>2025-08-25 14:56:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-06 15:48:32 +0200
commit23743ba64709a9c137c1b928f8b8e00d846af9cc (patch)
tree2df060ebb0376e1d46cbdaa5c0057330b9046602 /include/linux/console_struct.h
parentcc4d900d0d6d8dd5c41832a93ff3cfa629a78f9a (diff)
vt: add support for smput/rmput escape codes
Support "\e[?1049h" and "\e[?1049l" escape codes. This patch allows programs to enter and leave alternate screens. This feature is widely available in graphical terminal emulators and mostly used by fullscreen terminal-based user interfaces such as text editors. Most editors such as vim and nano assume this escape code in not supported and will not try to print the escape sequence if TERM=linux. To try out this patch, run `TERM=xterm-256color vim` inside a VT. Signed-off-by: Calixte Pernot <calixte.pernot@grenoble-inp.org> Link: https://lore.kernel.org/r/20250825125607.2478-3-calixte.pernot@grenoble-inp.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/console_struct.h')
-rw-r--r--include/linux/console_struct.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index 59b4fec5f254..13b35637bd5a 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -159,6 +159,9 @@ struct vc_data {
struct uni_pagedict *uni_pagedict;
struct uni_pagedict **uni_pagedict_loc; /* [!] Location of uni_pagedict variable for this console */
u32 **vc_uni_lines; /* unicode screen content */
+ u16 *vc_saved_screen;
+ unsigned int vc_saved_cols;
+ unsigned int vc_saved_rows;
/* additional information is in vt_kern.h */
};