diff options
| author | Eli Zaretskii | 2017-06-30 11:43:49 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-06-30 11:43:49 +0300 |
| commit | dfe1c820d3dca6673aba911a4a37969bbabd0486 (patch) | |
| tree | 9a4e2e8f8b0e245ff29617dcd1efd21ff9b9df33 /src/dispextern.h | |
| parent | 5b9b49492b9c024bd07b83ef6e5d095af6b8fdd0 (diff) | |
| download | emacs-dfe1c820d3dca6673aba911a4a37969bbabd0486.tar.gz 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.h | 5 |
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 | |||
| 2667 | /* The byte position corresponding to lnum. */ | 2667 | /* The byte position corresponding to lnum. */ |
| 2668 | ptrdiff_t lnum_bytepos; | 2668 | ptrdiff_t lnum_bytepos; |
| 2669 | 2669 | ||
| 2670 | /* The width in columns needed for display of the line numbers, or | 2670 | /* The width, in columns and in pixels, needed for display of the |
| 2671 | zero if not computed. */ | 2671 | line numbers, or zero if not computed. */ |
| 2672 | int lnum_width; | 2672 | int lnum_width; |
| 2673 | int lnum_pixel_width; | ||
| 2673 | 2674 | ||
| 2674 | /* The line number of point's line, or zero if not computed yet. */ | 2675 | /* The line number of point's line, or zero if not computed yet. */ |
| 2675 | ptrdiff_t pt_lnum; | 2676 | ptrdiff_t pt_lnum; |