diff options
| author | Eli Zaretskii | 2021-02-05 14:24:01 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-02-05 14:24:01 +0200 |
| commit | 764db69dd06b794074561e3830fdf02e67698445 (patch) | |
| tree | f1bcb7d8501851869c489e4cf767417458d00806 /src | |
| parent | f00afb9bb8b5356690e2a785d14aa89995c96f50 (diff) | |
| download | emacs-764db69dd06b794074561e3830fdf02e67698445.tar.gz emacs-764db69dd06b794074561e3830fdf02e67698445.zip | |
Fix last change in 'window-text-pixel-size'
* src/xdisp.c (Fwindow_text_pixel_size): Fix last change: preserve
the original Y coordinate after start_display, instead of zeroing
it out. Reported by martin rudalics <rudalics@gmx.at>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 426c874cdb5..4db981aa655 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10706,6 +10706,7 @@ include the height of both, if present, in the return value. */) | |||
| 10706 | 10706 | ||
| 10707 | itdata = bidi_shelve_cache (); | 10707 | itdata = bidi_shelve_cache (); |
| 10708 | start_display (&it, w, startp); | 10708 | start_display (&it, w, startp); |
| 10709 | int start_y = it.current_y; | ||
| 10709 | /* It makes no sense to measure dimensions of region of text that | 10710 | /* It makes no sense to measure dimensions of region of text that |
| 10710 | crosses the point where bidi reordering changes scan direction. | 10711 | crosses the point where bidi reordering changes scan direction. |
| 10711 | By using unidirectional movement here we at least support the use | 10712 | By using unidirectional movement here we at least support the use |
| @@ -10726,7 +10727,7 @@ include the height of both, if present, in the return value. */) | |||
| 10726 | int start_x = it.current_x; | 10727 | int start_x = it.current_x; |
| 10727 | int move_op = MOVE_TO_POS | MOVE_TO_Y; | 10728 | int move_op = MOVE_TO_POS | MOVE_TO_Y; |
| 10728 | int to_x = -1; | 10729 | int to_x = -1; |
| 10729 | it.current_y = 0; | 10730 | it.current_y = start_y; |
| 10730 | /* If FROM is on a newline, pretend that we start at the beginning | 10731 | /* If FROM is on a newline, pretend that we start at the beginning |
| 10731 | of the next line, because the newline takes no place on display. */ | 10732 | of the next line, because the newline takes no place on display. */ |
| 10732 | if (FETCH_BYTE (start) == '\n') | 10733 | if (FETCH_BYTE (start) == '\n') |