[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Line-spacing and phys cursor y position
From: |
David Reitter |
Subject: |
Line-spacing and phys cursor y position |
Date: |
Thu, 13 May 2010 21:00:32 -0400 |
I find that the cursor is drawn too far up when line-spacing is used, (e.g.
(setq line-spacing 1.2), increase font-size).
The reason is that at least in my configuration, text is drawn in the center of
the rows and not at the upper end, and get_phys_cursor_geometry() doesn't take
extra_line_spacing into account.
Could someone try this out on GNU/Linux and maybe Windows before I try to
commit it?
Is this patch OK?
- D
diff --git a/src/xdisp.c b/src/xdisp.c
index 30374a2..e1c6f7a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2114,7 +2114,7 @@ get_phys_cursor_geometry (w, row, glyph, xp, yp, heightp)
wd = min (FRAME_COLUMN_WIDTH (f), wd);
w->phys_cursor_width = wd;
- y = w->phys_cursor.y + row->ascent - glyph->ascent;
+ y = w->phys_cursor.y + row->ascent - glyph->ascent +
(row->extra_line_spacing / 2);
/* If y is below window bottom, ensure that we still see a cursor. */
h0 = min (FRAME_LINE_HEIGHT (f), row->visible_height);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Line-spacing and phys cursor y position,
David Reitter <=