diff options
| author | Richard M. Stallman | 2002-11-29 16:20:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-11-29 16:20:20 +0000 |
| commit | 0e47bbf745299990bdc1dcbaafe29ca8bb45b551 (patch) | |
| tree | 5c2b8eff0559fbc6ac351062942eb9b2cb491363 /src | |
| parent | 8f688cb015d38b4f9cefe81debbcf9dec902f991 (diff) | |
| download | emacs-0e47bbf745299990bdc1dcbaafe29ca8bb45b551.tar.gz emacs-0e47bbf745299990bdc1dcbaafe29ca8bb45b551.zip | |
(start_display): Check more intelligently for
whether the line is continued.
(move_it_vertically_backward): Clear it->continuation_lines_width.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 14 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b12eca03770..4cc611c5854 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2002-11-29 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (start_display): Check more intelligently for | ||
| 4 | whether the line is continued. | ||
| 5 | (move_it_vertically_backward): Clear it->continuation_lines_width. | ||
| 6 | |||
| 1 | 2002-11-28 Dave Love <fx@gnu.org> | 7 | 2002-11-28 Dave Love <fx@gnu.org> |
| 2 | 8 | ||
| 3 | * s/amdahl.h, s/unipl5-0.h, m/sgi3000.h, s/3700.h, s/alliant-2800.h: | 9 | * s/amdahl.h, s/unipl5-0.h, m/sgi3000.h, s/3700.h, s/alliant-2800.h: |
diff --git a/src/xdisp.c b/src/xdisp.c index 36d26f5cef8..38df34d7c53 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1791,16 +1791,27 @@ start_display (it, w, pos) | |||
| 1791 | || FETCH_BYTE (BYTEPOS (pos) - 1) == '\n'); | 1791 | || FETCH_BYTE (BYTEPOS (pos) - 1) == '\n'); |
| 1792 | if (!start_at_line_beg_p) | 1792 | if (!start_at_line_beg_p) |
| 1793 | { | 1793 | { |
| 1794 | int new_x; | ||
| 1795 | |||
| 1794 | reseat_at_previous_visible_line_start (it); | 1796 | reseat_at_previous_visible_line_start (it); |
| 1795 | move_it_to (it, CHARPOS (pos), -1, -1, -1, MOVE_TO_POS); | 1797 | move_it_to (it, CHARPOS (pos), -1, -1, -1, MOVE_TO_POS); |
| 1796 | 1798 | ||
| 1799 | new_x = it->current_x + it->pixel_width; | ||
| 1800 | |||
| 1797 | /* If lines are continued, this line may end in the middle | 1801 | /* If lines are continued, this line may end in the middle |
| 1798 | of a multi-glyph character (e.g. a control character | 1802 | of a multi-glyph character (e.g. a control character |
| 1799 | displayed as \003, or in the middle of an overlay | 1803 | displayed as \003, or in the middle of an overlay |
| 1800 | string). In this case move_it_to above will not have | 1804 | string). In this case move_it_to above will not have |
| 1801 | taken us to the start of the continuation line but to the | 1805 | taken us to the start of the continuation line but to the |
| 1802 | end of the continued line. */ | 1806 | end of the continued line. */ |
| 1803 | if (it->current_x > 0) | 1807 | if (it->current_x > 0 |
| 1808 | && !it->truncate_lines_p /* Lines are continued. */ | ||
| 1809 | && (/* And glyph doesn't fit on the line. */ | ||
| 1810 | new_x > it->last_visible_x | ||
| 1811 | /* Or it fits exactly and we're on a window | ||
| 1812 | system frame. */ | ||
| 1813 | || (new_x == it->last_visible_x | ||
| 1814 | && FRAME_WINDOW_P (it->f)))) | ||
| 1804 | { | 1815 | { |
| 1805 | if (it->current.dpvec_index >= 0 | 1816 | if (it->current.dpvec_index >= 0 |
| 1806 | || it->current.overlay_string_index >= 0) | 1817 | || it->current.overlay_string_index >= 0) |
| @@ -5407,6 +5418,7 @@ move_it_vertically_backward (it, dy) | |||
| 5407 | 5418 | ||
| 5408 | /* We are now surely at a line start. */ | 5419 | /* We are now surely at a line start. */ |
| 5409 | it->current_x = it->hpos = 0; | 5420 | it->current_x = it->hpos = 0; |
| 5421 | it->continuation_lines_width = 0; | ||
| 5410 | 5422 | ||
| 5411 | /* Move forward and see what y-distance we moved. First move to the | 5423 | /* Move forward and see what y-distance we moved. First move to the |
| 5412 | start of the next line so that we get its height. We need this | 5424 | start of the next line so that we get its height. We need this |