aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/terminal.c20
1 files 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)
110void 110void
111cursor_to (struct frame *f, int vpos, int hpos) 111cursor_to (struct frame *f, int vpos, int hpos)
112{ 112{
113 if (FRAME_TERMINAL (f)->cursor_to_hook) 113 struct terminal *term = FRAME_TERMINAL (f);
114 (*FRAME_TERMINAL (f)->cursor_to_hook) (f, vpos + f->top_pos, 114 if (term->cursor_to_hook)
115 hpos + f->left_pos); 115 {
116 int x, y;
117 root_xy (f, hpos, vpos, &x, &y);
118 term->cursor_to_hook (f, y, x);
119 }
116} 120}
117 121
118/* Similar but don't take any account of the wasted characters. */ 122/* Similar but don't take any account of the wasted characters. */
@@ -120,9 +124,13 @@ cursor_to (struct frame *f, int vpos, int hpos)
120void 124void
121raw_cursor_to (struct frame *f, int row, int col) 125raw_cursor_to (struct frame *f, int row, int col)
122{ 126{
123 if (FRAME_TERMINAL (f)->raw_cursor_to_hook) 127 struct terminal *term = FRAME_TERMINAL (f);
124 (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row + f->top_pos, 128 if (term->raw_cursor_to_hook)
125 col + f->left_pos); 129 {
130 int x, y;
131 root_xy (f, row, col, &x, &y);
132 term->raw_cursor_to_hook (f, y, x);
133 }
126} 134}
127 135
128/* Erase operations. */ 136/* Erase operations. */