]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Fix cursor positioning of nested tty child frames"
authorGerd Möllmann <gerd@gnu.org>
Sat, 25 Jan 2025 08:39:54 +0000 (09:39 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sat, 25 Jan 2025 17:46:39 +0000 (18:46 +0100)
This reverts commit 8cbb3c7335ff03b6fae4efeae126e91993cb962a.

(cherry picked from commit 65036323fc1cdf18a7812b1c922583e6466972a6)

src/terminal.c

index e6d5a5d309aa3d430d7444d6b8d9278d479b9796..db6d42d4b4ff4c16e199ca95be544c121e6e4dc9 100644 (file)
@@ -110,13 +110,9 @@ set_terminal_window (struct frame *f, int size)
 void
 cursor_to (struct frame *f, int vpos, int hpos)
 {
-  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);
-    }
+  if (FRAME_TERMINAL (f)->cursor_to_hook)
+    (*FRAME_TERMINAL (f)->cursor_to_hook) (f, vpos + f->top_pos,
+                                          hpos + f->left_pos);
 }
 
 /* Similar but don't take any account of the wasted characters.  */
@@ -124,13 +120,9 @@ cursor_to (struct frame *f, int vpos, int hpos)
 void
 raw_cursor_to (struct frame *f, int row, int col)
 {
-  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);
-    }
+  if (FRAME_TERMINAL (f)->raw_cursor_to_hook)
+    (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row + f->top_pos,
+                                              col + f->left_pos);
 }
 
 /* Erase operations.  */