diff options
| author | Po Lu | 2024-05-05 09:38:27 +0800 |
|---|---|---|
| committer | Po Lu | 2024-05-05 09:38:27 +0800 |
| commit | 129312aa12c2f9c2cc44fcbdecb6b6a45b7588f4 (patch) | |
| tree | 0da5ee391da751df296f4b59f1d5b0eb1339f4ba /src | |
| parent | 51791fd1781729baeb38551e833861d9c24c302f (diff) | |
| download | emacs-129312aa12c2f9c2cc44fcbdecb6b6a45b7588f4.tar.gz emacs-129312aa12c2f9c2cc44fcbdecb6b6a45b7588f4.zip | |
Fix cursor misalignment on truncated RTL rows
* src/xdisp.c (set_cursor_from_row): Begin computing the
position of the rightmost glyph from row->x, not 0.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 85802ec5083..8829c617f29 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -18182,7 +18182,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 18182 | --glyph; | 18182 | --glyph; |
| 18183 | /* By default, in reversed rows we put the cursor on the | 18183 | /* By default, in reversed rows we put the cursor on the |
| 18184 | rightmost (first in the reading order) glyph. */ | 18184 | rightmost (first in the reading order) glyph. */ |
| 18185 | for (x = 0, g = end + 1; g < glyph; g++) | 18185 | for (x = row->x, g = end + 1; g < glyph; g++) |
| 18186 | x += g->pixel_width; | 18186 | x += g->pixel_width; |
| 18187 | while (end < glyph | 18187 | while (end < glyph |
| 18188 | && NILP ((end + 1)->object) | 18188 | && NILP ((end + 1)->object) |