diff options
| author | Eli Zaretskii | 2011-08-16 17:28:19 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-08-16 17:28:19 +0300 |
| commit | b215eee57d8427ac896f42a9546930cd852a1637 (patch) | |
| tree | d175a57a68461b81699754bf11fb915118afc4a3 /src | |
| parent | a4579d332d432ea629a1ad2168ce8023d172d563 (diff) | |
| download | emacs-b215eee57d8427ac896f42a9546930cd852a1637.tar.gz emacs-b215eee57d8427ac896f42a9546930cd852a1637.zip | |
Fix cursor positioning at end of buffer under bidi display.
src/xdisp.c (set_cursor_from_row): Don't accept a previous candidate
if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2364f71c6a4..5bc07722191 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-08-16 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (set_cursor_from_row): Don't accept a previous candidate | ||
| 4 | if it fails the cursor_row_p test. Fixes cursor positioning at ZV. | ||
| 5 | |||
| 1 | 2011-08-16 Ken Brown <kbrown@cornell.edu> | 6 | 2011-08-16 Ken Brown <kbrown@cornell.edu> |
| 2 | 7 | ||
| 3 | Fix memory allocation problems in Cygwin build (Bug#9273). | 8 | Fix memory allocation problems in Cygwin build (Bug#9273). |
diff --git a/src/xdisp.c b/src/xdisp.c index b83d4bac743..ea98ac575d9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -13751,11 +13751,13 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13751 | /* that candidate is not the row we are processing */ | 13751 | /* that candidate is not the row we are processing */ |
| 13752 | && MATRIX_ROW (matrix, w->cursor.vpos) != row | 13752 | && MATRIX_ROW (matrix, w->cursor.vpos) != row |
| 13753 | /* Make sure cursor.vpos specifies a row whose start and end | 13753 | /* Make sure cursor.vpos specifies a row whose start and end |
| 13754 | charpos occlude point. This is because some callers of this | 13754 | charpos occlude point, and it is valid candidate for being a |
| 13755 | function leave cursor.vpos at the row where the cursor was | 13755 | cursor-row. This is because some callers of this function |
| 13756 | displayed during the last redisplay cycle. */ | 13756 | leave cursor.vpos at the row where the cursor was displayed |
| 13757 | during the last redisplay cycle. */ | ||
| 13757 | && MATRIX_ROW_START_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos)) <= pt_old | 13758 | && MATRIX_ROW_START_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos)) <= pt_old |
| 13758 | && pt_old <= MATRIX_ROW_END_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos))) | 13759 | && pt_old <= MATRIX_ROW_END_CHARPOS (MATRIX_ROW (matrix, w->cursor.vpos)) |
| 13760 | && cursor_row_p (MATRIX_ROW (matrix, w->cursor.vpos))) | ||
| 13759 | { | 13761 | { |
| 13760 | struct glyph *g1 = | 13762 | struct glyph *g1 = |
| 13761 | MATRIX_ROW_GLYPH_START (matrix, w->cursor.vpos) + w->cursor.hpos; | 13763 | MATRIX_ROW_GLYPH_START (matrix, w->cursor.vpos) + w->cursor.hpos; |