diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 7f795a4dc40..dc109883b53 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -935,6 +935,10 @@ adjust_window_charstarts (w, vpos, adjust) | |||
| 935 | } | 935 | } |
| 936 | } | 936 | } |
| 937 | 937 | ||
| 938 | /* Check the charstarts values in the area of window W | ||
| 939 | for internal consistency. We cannot check that they are "right"; | ||
| 940 | we can only look for something nonsensical. */ | ||
| 941 | |||
| 938 | verify_charstarts (w) | 942 | verify_charstarts (w) |
| 939 | struct window *w; | 943 | struct window *w; |
| 940 | { | 944 | { |
| @@ -945,17 +949,32 @@ verify_charstarts (w) | |||
| 945 | int left = XFASTINT (w->left); | 949 | int left = XFASTINT (w->left); |
| 946 | int right = left + window_internal_width (w); | 950 | int right = left + window_internal_width (w); |
| 947 | int next_line; | 951 | int next_line; |
| 952 | int truncate = (XINT (w->hscroll) | ||
| 953 | || (truncate_partial_width_windows | ||
| 954 | && (XFASTINT (w->width) < FRAME_WIDTH (f))) | ||
| 955 | || !NILP (XBUFFER (w->buffer)->truncate_lines)); | ||
| 948 | 956 | ||
| 949 | for (i = top; i < bottom; i++) | 957 | for (i = top; i < bottom; i++) |
| 950 | { | 958 | { |
| 951 | int j; | 959 | int j; |
| 952 | int last; | 960 | int last; |
| 953 | int *charstart | 961 | int *charstart = FRAME_CURRENT_GLYPHS (f)->charstarts[i]; |
| 954 | = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[i]; | ||
| 955 | 962 | ||
| 956 | if (i != top) | 963 | if (i != top) |
| 957 | if (charstart[left] != next_line) | 964 | { |
| 958 | abort (); | 965 | if (truncate) |
| 966 | { | ||
| 967 | /* If we are truncating lines, allow a jump | ||
| 968 | in charstarts from one line to the next. */ | ||
| 969 | if (charstart[left] < next_line) | ||
| 970 | abort (); | ||
| 971 | } | ||
| 972 | else | ||
| 973 | { | ||
| 974 | if (charstart[left] != next_line) | ||
| 975 | abort (); | ||
| 976 | } | ||
| 977 | } | ||
| 959 | 978 | ||
| 960 | for (j = left; j < right; j++) | 979 | for (j = left; j < right; j++) |
| 961 | if (charstart[j] > 0) | 980 | if (charstart[j] > 0) |