summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-06-30 11:43:49 +0300
committerEli Zaretskii <eliz@gnu.org>2017-06-30 11:43:49 +0300
commitdfe1c820d3dca6673aba911a4a37969bbabd0486 (patch)
tree9a4e2e8f8b0e245ff29617dcd1efd21ff9b9df33 /src/dispextern.h
parent5b9b49492b9c024bd07b83ef6e5d095af6b8fdd0 (diff)
downloademacs-dfe1c820d3dca6673aba911a4a37969bbabd0486.tar.gz
emacs-dfe1c820d3dca6673aba911a4a37969bbabd0486.tar.bz2
emacs-dfe1c820d3dca6673aba911a4a37969bbabd0486.zip
Fix TAB display when the line-number face uses a smaller/larger font
* src/dispextern.h (struct it): New member lnum_pixel_width. * src/xdisp.c (maybe_produce_line_number): Compute the width of the line-number display in pixels. (x_produce_glyphs): Use it->lnum_pixel_width instead of a kludge that used it->lnum_width and made assumptions about pixel width.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 08e5caa893b..84a27169ea1 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2667,9 +2667,10 @@ struct it
/* The byte position corresponding to lnum. */
ptrdiff_t lnum_bytepos;
- /* The width in columns needed for display of the line numbers, or
- zero if not computed. */
+ /* The width, in columns and in pixels, needed for display of the
+ line numbers, or zero if not computed. */
int lnum_width;
+ int lnum_pixel_width;
/* The line number of point's line, or zero if not computed yet. */
ptrdiff_t pt_lnum;