diff options
| author | Eli Zaretskii | 2012-12-27 19:29:14 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-12-27 19:29:14 +0200 |
| commit | 7a3a74936f32dd6f3778b7d15264ec843e203f04 (patch) | |
| tree | cde2f609b43a50b68044cc401b378e64294a4ad6 /src | |
| parent | c88943a2a42107443a1eb776687fe1f1e5e876ac (diff) | |
| download | emacs-7a3a74936f32dd6f3778b7d15264ec843e203f04.tar.gz emacs-7a3a74936f32dd6f3778b7d15264ec843e203f04.zip | |
Fix bug #13277 with TTY cursor positioning in a line with overlay arrow.
src/xdisp.c (set_cursor_from_row): Don't confuse a truncation or
continuation glyph on a TTY with an indication of an empty line.
src/dispextern.h: Improve commentary to glyph->charpos and
glyph->object.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/dispextern.h | 13 | ||||
| -rw-r--r-- | src/xdisp.c | 7 |
3 files changed, 21 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fccdc1dfcae..fefe16a5f8f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-12-27 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (set_cursor_from_row): Don't confuse a truncation or | ||
| 4 | continuation glyph on a TTY with an indication of an empty line. | ||
| 5 | (Bug#13277) | ||
| 6 | |||
| 1 | 2012-12-27 Glenn Morris <rgm@gnu.org> | 7 | 2012-12-27 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * cygw32.c (Fcygwin_convert_file_name_to_windows) | 9 | * cygw32.c (Fcygwin_convert_file_name_to_windows) |
diff --git a/src/dispextern.h b/src/dispextern.h index c5ebb808b05..df0098df478 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -317,13 +317,18 @@ struct glyph | |||
| 317 | Lisp string, this is a position in that string. If it is a | 317 | Lisp string, this is a position in that string. If it is a |
| 318 | buffer, this is a position in that buffer. A value of -1 | 318 | buffer, this is a position in that buffer. A value of -1 |
| 319 | together with a null object means glyph is a truncation glyph at | 319 | together with a null object means glyph is a truncation glyph at |
| 320 | the start of a row. */ | 320 | the start of a row. Right truncation and continuation glyphs at |
| 321 | the right edge of a row have their position set to the next | ||
| 322 | buffer position that is not shown on this row. Glyphs inserted | ||
| 323 | by redisplay, such as the empty space after the end of a line on | ||
| 324 | TTYs, have this set to -1. */ | ||
| 321 | ptrdiff_t charpos; | 325 | ptrdiff_t charpos; |
| 322 | 326 | ||
| 323 | /* Lisp object source of this glyph. Currently either a buffer or | 327 | /* Lisp object source of this glyph. Currently either a buffer or a |
| 324 | a string, if the glyph was produced from characters which came from | 328 | string, if the glyph was produced from characters which came from |
| 325 | a buffer or a string; or 0 if the glyph was inserted by redisplay | 329 | a buffer or a string; or 0 if the glyph was inserted by redisplay |
| 326 | for its own purposes such as padding. */ | 330 | for its own purposes such as padding or truncation/continuation |
| 331 | glyphs on TTYs. */ | ||
| 327 | Lisp_Object object; | 332 | Lisp_Object object; |
| 328 | 333 | ||
| 329 | /* Width in pixels. */ | 334 | /* Width in pixels. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index 8336594ca61..4ec0e29f67c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14241,7 +14241,12 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14241 | CHARPOS is zero or negative. */ | 14241 | CHARPOS is zero or negative. */ |
| 14242 | int empty_line_p = | 14242 | int empty_line_p = |
| 14243 | (row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end) | 14243 | (row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end) |
| 14244 | && INTEGERP (glyph->object) && glyph->charpos > 0; | 14244 | && INTEGERP (glyph->object) && glyph->charpos > 0 |
| 14245 | /* On a TTY, continued and truncated rows also have a glyph at | ||
| 14246 | their end whose OBJECT is zero and whose CHARPOS is | ||
| 14247 | positive (the continuation and truncation glyphs), but such | ||
| 14248 | rows are obviously not "empty". */ | ||
| 14249 | && !(row->continued_p || row->truncated_on_right_p); | ||
| 14245 | 14250 | ||
| 14246 | if (row->ends_in_ellipsis_p && pos_after == last_pos) | 14251 | if (row->ends_in_ellipsis_p && pos_after == last_pos) |
| 14247 | { | 14252 | { |