Commit b47e0dcf authored by Eli Zaretskii's avatar Eli Zaretskii

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.
parent 166e930d
......@@ -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>
......
......@@ -12776,6 +12776,13 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
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 @@ try_cursor_movement (window, startp, scroll_step)
++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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment