aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorEli Zaretskii2010-03-13 11:38:01 -0500
committerEli Zaretskii2010-03-13 11:38:01 -0500
commit8eef7665fa98baae93da5151c27ca0db4d1d6f5b (patch)
tree889cf0c172a1ff24484c8f65d8babae7b003fff1 /src/dispextern.h
parent9565d1e6f3d09d5cd5afebd1b30a7571a27199cc (diff)
downloademacs-8eef7665fa98baae93da5151c27ca0db4d1d6f5b.tar.gz
emacs-8eef7665fa98baae93da5151c27ca0db4d1d6f5b.zip
Continue work on cursor movement in continued lines.
xdisp.c (try_cursor_movement): Give up if rows are bidi-reordered and point moved backwards. Examine all the candidate rows that occlude point, to return the best match. (row_containing_pos): With bidi-reordered rows, don't return the first one that occludes point; rather, examine all candidates and return the best match, with he glyph that's closest to point. (display_line): When looking for min position, don't consider negative values of glyph->charpos. (Fixes a crash with "C-x 3" at ZV.) Record the position after EOL in it->eol_pos, and use it to set end_pos of the last row produced for a continued line. Fix the condition for passing candidate rows to set_cursor_from_row: check ends_at_zv_p flag of the best candidate row, not of the current row. dispextern.h (struct it): New member eol_pos. .gdbinit (prowlims): Display the ends_at_zv_p flag.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 2b581fd0eaa..3202385e541 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2016,8 +2016,8 @@ struct it
2016 iterator position in `current'. */ 2016 iterator position in `current'. */
2017 EMACS_INT prev_stop; 2017 EMACS_INT prev_stop;
2018 2018
2019 /* Last stop position iterated across whose embedding level is equal 2019 /* Last stop position iterated across whose bidi embedding level is
2020 to the current paragraph's embedding level. */ 2020 equal to the current paragraph's base embedding level. */
2021 EMACS_INT base_level_stop; 2021 EMACS_INT base_level_stop;
2022 2022
2023 /* Maximum string or buffer position + 1. ZV when iterating over 2023 /* Maximum string or buffer position + 1. ZV when iterating over
@@ -2327,6 +2327,14 @@ struct it
2327 incremented/reset by display_line, move_it_to etc. */ 2327 incremented/reset by display_line, move_it_to etc. */
2328 int continuation_lines_width; 2328 int continuation_lines_width;
2329 2329
2330 /* Buffer position that ends the buffer text line being iterated.
2331 This is normally the position after the newline at EOL. If this
2332 is the last line of the buffer and it doesn't have a newline,
2333 value is ZV/ZV_BYTE. Set and used only if IT->bidi_p, for
2334 setting the end position of glyph rows produced for continuation
2335 lines, see display_line. */
2336 struct text_pos eol_pos;
2337
2330 /* Current y-position. Automatically incremented by the height of 2338 /* Current y-position. Automatically incremented by the height of
2331 glyph_row in move_it_to and display_line. */ 2339 glyph_row in move_it_to and display_line. */
2332 int current_y; 2340 int current_y;