[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dbb5a124-4947-491e-8903-faa18e0e5bde@kernel.org>
Date: Wed, 10 Sep 2025 08:43:02 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Calixte Pernot <calixte.pernot@...noble-inp.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, Calixte Pernot <c@...te.email>
Subject: Re: [PATCH v3] vt: add support for smput/rmput escape codes
On 09. 09. 25, 22:26, Calixte Pernot wrote:
> From: Calixte Pernot <c@...te.email>
>
> 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@...noble-inp.org>
> ---
> drivers/tty/vt/vt.c | 58 ++++++++++++++++++++++++++++++++++
> include/linux/console_struct.h | 3 ++
> 2 files changed, 61 insertions(+)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index 62049ceb3..d9e4eb3f0 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -141,6 +141,7 @@ static const struct consw *con_driver_map[MAX_NR_CONSOLES];
> static int con_open(struct tty_struct *, struct file *);
> static void vc_init(struct vc_data *vc, int do_clear);
> static void gotoxy(struct vc_data *vc, int new_x, int new_y);
> +static void restore_cur(struct vc_data *vc);
> static void save_cur(struct vc_data *vc);
> static void reset_terminal(struct vc_data *vc, int do_clear);
> static void con_flush_chars(struct tty_struct *tty);
> @@ -1344,6 +1345,10 @@ struct vc_data *vc_deallocate(unsigned int currcons)
> kfree(vc->vc_screenbuf);
> vc_cons[currcons].d = NULL;
> }
> + if (vc->vc_saved_screen != NULL) {
> + kfree(vc->vc_saved_screen);
> + vc->vc_saved_screen = NULL;
> + }
Yes, that's the bug. (I am not sure why are you sending this?)
thanks,
--
js
suse labs
Powered by blists - more mailing lists