emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 26b144f241c 2/6: Reapply "Fix cursor positioning of nested tt


From: Po Lu
Subject: Re: master 26b144f241c 2/6: Reapply "Fix cursor positioning of nested tty child frames"
Date: Mon, 27 Jan 2025 09:07:23 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Gerd Moellmann <gerd.moellmann@gmail.com> writes:

> branch: master
> commit 26b144f241c7843b635415f2b68b8c3df0b23e02
> Author: Gerd Möllmann <gerd@gnu.org>
> Commit: Gerd Möllmann <gerd@gnu.org>
>
>     Reapply "Fix cursor positioning of nested tty child frames"
>     
>     This reverts commit 65036323fc1cdf18a7812b1c922583e6466972a6.
> ---
>  src/terminal.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/src/terminal.c b/src/terminal.c
> index db6d42d4b4f..e6d5a5d309a 100644
> --- a/src/terminal.c
> +++ b/src/terminal.c
> @@ -110,9 +110,13 @@ set_terminal_window (struct frame *f, int size)
>  void
>  cursor_to (struct frame *f, int vpos, int hpos)
>  {
> -  if (FRAME_TERMINAL (f)->cursor_to_hook)
> -    (*FRAME_TERMINAL (f)->cursor_to_hook) (f, vpos + f->top_pos,
> -                                        hpos + f->left_pos);
> +  struct terminal *term = FRAME_TERMINAL (f);
> +  if (term->cursor_to_hook)
> +    {
> +      int x, y;
> +      root_xy (f, hpos, vpos, &x, &y);
> +      term->cursor_to_hook (f, y, x);
> +    }
>  }
>  
>  /* Similar but don't take any account of the wasted characters.  */
> @@ -120,9 +124,13 @@ cursor_to (struct frame *f, int vpos, int hpos)
>  void
>  raw_cursor_to (struct frame *f, int row, int col)
>  {
> -  if (FRAME_TERMINAL (f)->raw_cursor_to_hook)
> -    (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row + f->top_pos,
> -                                            col + f->left_pos);
> +  struct terminal *term = FRAME_TERMINAL (f);
> +  if (term->raw_cursor_to_hook)
> +    {
> +      int x, y;
> +      root_xy (f, row, col, &x, &y);
> +      term->raw_cursor_to_hook (f, y, x);
> +    }
>  }
>  
>  /* Erase operations.  */

Please be more considerate for the Android port, which does not support
text terminals and where root_xy and other like functions are _NOT_
defined.

Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]