diff options
| author | Eli Zaretskii | 2010-05-01 18:53:35 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2010-05-01 18:53:35 +0300 |
| commit | b47e0dcf2db5d0f754342f0eb13e53974bfbefbe (patch) | |
| tree | de93addf1282fee93f9da336dd349aa89640c2bb /src | |
| parent | 166e930d762b6f8f9c40d61678d4dac073d5a42e (diff) | |
| download | emacs-b47e0dcf2db5d0f754342f0eb13e53974bfbefbe.tar.gz emacs-b47e0dcf2db5d0f754342f0eb13e53974bfbefbe.zip | |
Fix cursor positioning in partial width windows on TTY.
xdisp.c (set_cursor_from_row): Don't place cursor on the vertical border
glyph between adjacent windows.
(try_cursor_movement): Don't assume that row->end == (row+1)->start,
test for that explicitly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 16 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7becf77dde9..4de1618f4d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -7,6 +7,10 @@ | |||
| 7 | (display_line): Fix prepending of truncation glyphs to R2L rows. | 7 | (display_line): Fix prepending of truncation glyphs to R2L rows. |
| 8 | (insert_left_trunc_glyphs): Support addition of left truncation | 8 | (insert_left_trunc_glyphs): Support addition of left truncation |
| 9 | glyphs to R2L rows. | 9 | glyphs to R2L rows. |
| 10 | (set_cursor_from_row): Don't place cursor on the vertical border | ||
| 11 | glyph between adjacent windows. | ||
| 12 | (try_cursor_movement): Don't assume that row->end == (row+1)->start, | ||
| 13 | test for that explicitly. | ||
| 10 | 14 | ||
| 11 | 2010-04-27 Eli Zaretskii <eliz@gnu.org> | 15 | 2010-04-27 Eli Zaretskii <eliz@gnu.org> |
| 12 | 16 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 6d0683ba566..6d906825d1e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -12776,6 +12776,13 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) | |||
| 12776 | rightmost glyph. Case in point: an empty last line that is | 12776 | rightmost glyph. Case in point: an empty last line that is |
| 12777 | part of an R2L paragraph. */ | 12777 | part of an R2L paragraph. */ |
| 12778 | cursor = end - 1; | 12778 | cursor = end - 1; |
| 12779 | /* Avoid placing the cursor on the last glyph of the row, where | ||
| 12780 | on terminal frames we hold the vertical border between | ||
| 12781 | adjacent windows. */ | ||
| 12782 | if (!FRAME_WINDOW_P (WINDOW_XFRAME (w)) | ||
| 12783 | && !WINDOW_RIGHTMOST_P (w) | ||
| 12784 | && cursor == row->glyphs[LAST_AREA] - 1) | ||
| 12785 | cursor--; | ||
| 12779 | x = -1; /* will be computed below, at label compute_x */ | 12786 | x = -1; /* will be computed below, at label compute_x */ |
| 12780 | } | 12787 | } |
| 12781 | 12788 | ||
| @@ -13716,11 +13723,14 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 13716 | ++row; | 13723 | ++row; |
| 13717 | } | 13724 | } |
| 13718 | 13725 | ||
| 13719 | /* The end position of a row equals the start position | 13726 | /* If the end position of a row equals the start |
| 13720 | of the next row. If PT is there, we would rather | 13727 | position of the next row, and PT is at that position, |
| 13721 | display it in the next line. */ | 13728 | we would rather display cursor in the next line. */ |
| 13722 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y | 13729 | while (MATRIX_ROW_BOTTOM_Y (row) < last_y |
| 13723 | && MATRIX_ROW_END_CHARPOS (row) == PT | 13730 | && MATRIX_ROW_END_CHARPOS (row) == PT |
| 13731 | && row < w->current_matrix->rows | ||
| 13732 | + w->current_matrix->nrows - 1 | ||
| 13733 | && MATRIX_ROW_START_CHARPOS (row+1) == PT | ||
| 13724 | && !cursor_row_p (w, row)) | 13734 | && !cursor_row_p (w, row)) |
| 13725 | ++row; | 13735 | ++row; |
| 13726 | 13736 | ||