diff options
| author | Gerd Moellmann | 2000-06-07 09:05:58 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-06-07 09:05:58 +0000 |
| commit | 173cbca8b12f9eddf632ccd8fe36104785eeaa2a (patch) | |
| tree | d48f0f7be193629dafaf380bc1e15c8411b790cf /src | |
| parent | c4ccaae42513e78adf7a8ef15dea20c6eff74052 (diff) | |
| download | emacs-173cbca8b12f9eddf632ccd8fe36104785eeaa2a.tar.gz emacs-173cbca8b12f9eddf632ccd8fe36104785eeaa2a.zip | |
(display_line): Fix code deciding in which line to
put the cursor.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 20 |
2 files changed, 17 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a208ad0be45..fb734387aa4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-06-07 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (display_line): Fix code deciding in which line to | ||
| 4 | put the cursor. | ||
| 5 | |||
| 1 | 2000-06-07 Kenichi Handa <handa@etl.go.jp> | 6 | 2000-06-07 Kenichi Handa <handa@etl.go.jp> |
| 2 | 7 | ||
| 3 | * fileio.c (e_write): Free composition data if stored in | 8 | * fileio.c (e_write): Free composition data if stored in |
diff --git a/src/xdisp.c b/src/xdisp.c index d6b8ed694b3..d81a5c4c9b2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11553,16 +11553,20 @@ display_line (it) | |||
| 11553 | /* Remember the position at which this line ends. */ | 11553 | /* Remember the position at which this line ends. */ |
| 11554 | row->end = it->current; | 11554 | row->end = it->current; |
| 11555 | 11555 | ||
| 11556 | /* Maybe set the cursor. We want to set the cursor on the first | 11556 | /* Maybe set the cursor. */ |
| 11557 | glyph having position PT. This means it doesn't matter if the | ||
| 11558 | row is continued and ends in the middle of the character at PT. | ||
| 11559 | If some glyphs of that character are in this row, this is the | ||
| 11560 | right row to put the cursor on. */ | ||
| 11561 | if (it->w->cursor.vpos < 0 | 11557 | if (it->w->cursor.vpos < 0 |
| 11562 | && PT >= MATRIX_ROW_START_CHARPOS (row) | 11558 | && PT >= MATRIX_ROW_START_CHARPOS (row) |
| 11563 | && PT <= MATRIX_ROW_END_CHARPOS (row) | 11559 | && PT <= MATRIX_ROW_END_CHARPOS (row)) |
| 11564 | && !(PT == ZV && !row->ends_at_zv_p)) | 11560 | { |
| 11565 | set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); | 11561 | /* Also see redisplay_window, case cursor movement in unchanged |
| 11562 | window. */ | ||
| 11563 | if (MATRIX_ROW_END_CHARPOS (row) == PT | ||
| 11564 | && !MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (row) | ||
| 11565 | && !row->ends_at_zv_p) | ||
| 11566 | ; | ||
| 11567 | else | ||
| 11568 | set_cursor_from_row (it->w, row, it->w->desired_matrix, 0, 0, 0, 0); | ||
| 11569 | } | ||
| 11566 | 11570 | ||
| 11567 | /* Highlight trailing whitespace. */ | 11571 | /* Highlight trailing whitespace. */ |
| 11568 | if (!NILP (Vshow_trailing_whitespace)) | 11572 | if (!NILP (Vshow_trailing_whitespace)) |