diff options
| author | Gregory Heytings | 2022-08-23 15:41:05 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2022-08-23 17:48:51 +0200 |
| commit | 1c837c42c22181e5fe998c7ea1c6e12c4e711872 (patch) | |
| tree | 92a5356d1db303524b7ea83efcc34bd6e8bf2617 /src/buffer.h | |
| parent | 5d3a99602f15372b305d04c6a732e5c69bbe0c5d (diff) | |
| download | emacs-1c837c42c22181e5fe998c7ea1c6e12c4e711872.tar.gz emacs-1c837c42c22181e5fe998c7ea1c6e12c4e711872.zip | |
Improve detection of long lines.
* src/buffer.h (struct buffer_text): New field.
(BUF_CHARS_UNCHANGED_MODIFIED, CHARS_UNCHANGED_MODIFIED): New macros.
* src/buffer.c (Fget_buffer_create): Initialize the new field.
* src/xdisp.c (mark_window_display_accurate_1): Set the new field.
(redisplay_window): Use it, together with CHARS_MODIFF, instead of
MODIFF and UNCHANGED_MODIFIED to decide whether to check for long
lines.
* src/pdumper.c (dump_buffer): Dump the new field.
Diffstat (limited to 'src/buffer.h')
| -rw-r--r-- | src/buffer.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h index 47b4bdf749b..77f9ea20afa 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -149,12 +149,18 @@ enum { BEG = 1, BEG_BYTE = BEG }; | |||
| 149 | #define BUF_BEG_UNCHANGED(buf) ((buf)->text->beg_unchanged) | 149 | #define BUF_BEG_UNCHANGED(buf) ((buf)->text->beg_unchanged) |
| 150 | #define BUF_END_UNCHANGED(buf) ((buf)->text->end_unchanged) | 150 | #define BUF_END_UNCHANGED(buf) ((buf)->text->end_unchanged) |
| 151 | 151 | ||
| 152 | #define BUF_CHARS_UNCHANGED_MODIFIED(buf) \ | ||
| 153 | ((buf)->text->chars_unchanged_modified) | ||
| 154 | |||
| 152 | #define UNCHANGED_MODIFIED \ | 155 | #define UNCHANGED_MODIFIED \ |
| 153 | BUF_UNCHANGED_MODIFIED (current_buffer) | 156 | BUF_UNCHANGED_MODIFIED (current_buffer) |
| 154 | #define OVERLAY_UNCHANGED_MODIFIED \ | 157 | #define OVERLAY_UNCHANGED_MODIFIED \ |
| 155 | BUF_OVERLAY_UNCHANGED_MODIFIED (current_buffer) | 158 | BUF_OVERLAY_UNCHANGED_MODIFIED (current_buffer) |
| 156 | #define BEG_UNCHANGED BUF_BEG_UNCHANGED (current_buffer) | 159 | #define BEG_UNCHANGED BUF_BEG_UNCHANGED (current_buffer) |
| 157 | #define END_UNCHANGED BUF_END_UNCHANGED (current_buffer) | 160 | #define END_UNCHANGED BUF_END_UNCHANGED (current_buffer) |
| 161 | |||
| 162 | #define CHARS_UNCHANGED_MODIFIED \ | ||
| 163 | BUF_CHARS_UNCHANGED_MODIFIED (current_buffer) | ||
| 158 | 164 | ||
| 159 | /* Functions to set PT in the current buffer, or another buffer. */ | 165 | /* Functions to set PT in the current buffer, or another buffer. */ |
| 160 | 166 | ||
| @@ -268,6 +274,9 @@ struct buffer_text | |||
| 268 | end_unchanged contain no useful information. */ | 274 | end_unchanged contain no useful information. */ |
| 269 | modiff_count overlay_unchanged_modified; | 275 | modiff_count overlay_unchanged_modified; |
| 270 | 276 | ||
| 277 | /* CHARS_MODIFF as of last redisplay that finished. */ | ||
| 278 | modiff_count chars_unchanged_modified; | ||
| 279 | |||
| 271 | /* Properties of this buffer's text. */ | 280 | /* Properties of this buffer's text. */ |
| 272 | INTERVAL intervals; | 281 | INTERVAL intervals; |
| 273 | 282 | ||