diff options
| author | Gerd Moellmann | 2001-08-13 12:14:32 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-08-13 12:14:32 +0000 |
| commit | b0e619b41a0cdd619b531d2f35135d83a872cbb4 (patch) | |
| tree | ab024b32e748c608dd2f16845fc9faedd4f53ce6 /src | |
| parent | 49e49b77b5858a25a71ee6c2cff4e6cafab42781 (diff) | |
| download | emacs-b0e619b41a0cdd619b531d2f35135d83a872cbb4.tar.gz emacs-b0e619b41a0cdd619b531d2f35135d83a872cbb4.zip | |
(move_it_by_lines) <DVPOS < 0>: If not already on
a line start, move back to the line start.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xdisp.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 89a26e3a463..4aea39cc3b6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2001-08-13 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-08-13 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (move_it_by_lines) <DVPOS < 0>: If not already on | ||
| 4 | a line start, move back to the line start. | ||
| 5 | |||
| 3 | * xdisp.c (resize_echo_area_exactly): Don't resize the mini-window | 6 | * xdisp.c (resize_echo_area_exactly): Don't resize the mini-window |
| 4 | exactly when a mini-buffer is active. | 7 | exactly when a mini-buffer is active. |
| 5 | 8 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 10e7abe1ddb..cb54fc178f5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5477,6 +5477,12 @@ move_it_by_lines (it, dvpos, need_y_p) | |||
| 5477 | struct it it2; | 5477 | struct it it2; |
| 5478 | int start_charpos, i; | 5478 | int start_charpos, i; |
| 5479 | 5479 | ||
| 5480 | /* If we start in the middle of a line, move to the beginning | ||
| 5481 | of that line first. */ | ||
| 5482 | if (IT_CHARPOS (*it) > BEGV | ||
| 5483 | && FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n') | ||
| 5484 | back_to_previous_visible_line_start (it); | ||
| 5485 | |||
| 5480 | /* Go back -DVPOS visible lines and reseat the iterator there. */ | 5486 | /* Go back -DVPOS visible lines and reseat the iterator there. */ |
| 5481 | start_charpos = IT_CHARPOS (*it); | 5487 | start_charpos = IT_CHARPOS (*it); |
| 5482 | for (i = -dvpos; i && IT_CHARPOS (*it) > BEGV; --i) | 5488 | for (i = -dvpos; i && IT_CHARPOS (*it) > BEGV; --i) |