Mercurial > emacs
changeset 108199:97b67e89ecc5
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.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 01 May 2010 18:53:35 +0300 |
parents | 0501d22b885f |
children | e30aff0bf9d5 e61225c9e186 |
files | src/ChangeLog src/xdisp.c |
diffstat | 2 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat May 01 16:39:44 2010 +0300 +++ b/src/ChangeLog Sat May 01 18:53:35 2010 +0300 @@ -7,6 +7,10 @@ (display_line): Fix prepending of truncation glyphs to R2L rows. (insert_left_trunc_glyphs): Support addition of left truncation glyphs to R2L rows. + (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. 2010-04-27 Eli Zaretskii <eliz@gnu.org>
--- a/src/xdisp.c Sat May 01 16:39:44 2010 +0300 +++ b/src/xdisp.c Sat May 01 18:53:35 2010 +0300 @@ -12776,6 +12776,13 @@ rightmost glyph. Case in point: an empty last line that is part of an R2L paragraph. */ cursor = end - 1; + /* Avoid placing the cursor on the last glyph of the row, where + on terminal frames we hold the vertical border between + adjacent windows. */ + if (!FRAME_WINDOW_P (WINDOW_XFRAME (w)) + && !WINDOW_RIGHTMOST_P (w) + && cursor == row->glyphs[LAST_AREA] - 1) + cursor--; x = -1; /* will be computed below, at label compute_x */ } @@ -13716,11 +13723,14 @@ ++row; } - /* The end position of a row equals the start position - of the next row. If PT is there, we would rather - display it in the next line. */ + /* If the end position of a row equals the start + position of the next row, and PT is at that position, + we would rather display cursor in the next line. */ while (MATRIX_ROW_BOTTOM_Y (row) < last_y && MATRIX_ROW_END_CHARPOS (row) == PT + && row < w->current_matrix->rows + + w->current_matrix->nrows - 1 + && MATRIX_ROW_START_CHARPOS (row+1) == PT && !cursor_row_p (w, row)) ++row;