]> git.eshelyaron.com Git - emacs.git/commitdiff
Report cursor correctly on PGTK when there is a margin
authorPo Lu <luangruo@yahoo.com>
Thu, 12 Jan 2023 10:36:14 +0000 (18:36 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 12 Jan 2023 10:36:14 +0000 (18:36 +0800)
* src/pgtkterm.c (pgtk_draw_window_cursor): Adjust frame_x by
the margin width as well.

src/pgtkterm.c

index 5158492ca099754027a76c29d5c6256d7f1c1187..c00e13550bd34dd3ec6be1ad1436bf2b852f7886 100644 (file)
@@ -2959,7 +2959,8 @@ pgtk_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x,
       if (w == XWINDOW (f->selected_window))
        {
          int frame_x = (WINDOW_TO_FRAME_PIXEL_X (w, x)
-                        + WINDOW_LEFT_FRINGE_WIDTH (w));
+                        + WINDOW_LEFT_FRINGE_WIDTH (w)
+                        + WINDOW_LEFT_MARGIN_WIDTH (w));
          int frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, y);
          pgtk_im_set_cursor_location (f, frame_x, frame_y,
                                       w->phys_cursor_width,