diff options
| author | Gregory Heytings | 2022-07-19 23:30:17 +0200 |
|---|---|---|
| committer | Gregory Heytings | 2022-07-19 23:30:17 +0200 |
| commit | c6bee1707523549ce02eadb506f54e9089ea1a3f (patch) | |
| tree | 56ca9b74d59eb3c4053d1a700cb867d05610bb39 /src | |
| parent | 9a894206f6990eb5e0edc464dae02700a33d2348 (diff) | |
| download | emacs-c6bee1707523549ce02eadb506f54e9089ea1a3f.tar.gz emacs-c6bee1707523549ce02eadb506f54e9089ea1a3f.zip | |
Revert commits 1ff69cc744 and 9a894206f6.
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 6 | ||||
| -rw-r--r-- | src/buffer.h | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 5 |
3 files changed, 1 insertions, 16 deletions
diff --git a/src/buffer.c b/src/buffer.c index 9a463363b93..a777668e44b 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -599,7 +599,6 @@ even if it is dead. The return value is never nil. */) | |||
| 599 | BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1; | 599 | BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1; |
| 600 | BUF_END_UNCHANGED (b) = 0; | 600 | BUF_END_UNCHANGED (b) = 0; |
| 601 | BUF_BEG_UNCHANGED (b) = 0; | 601 | BUF_BEG_UNCHANGED (b) = 0; |
| 602 | BUF_UNCHANGED_SIZE (b) = 0; | ||
| 603 | *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */ | 602 | *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */ |
| 604 | b->text->inhibit_shrinking = false; | 603 | b->text->inhibit_shrinking = false; |
| 605 | b->text->redisplay = false; | 604 | b->text->redisplay = false; |
| @@ -2478,11 +2477,6 @@ results, see Info node `(elisp)Swapping Text'. */) | |||
| 2478 | other_buffer->text->beg_unchanged = other_buffer->text->gpt; | 2477 | other_buffer->text->beg_unchanged = other_buffer->text->gpt; |
| 2479 | other_buffer->text->end_unchanged = other_buffer->text->gpt; | 2478 | other_buffer->text->end_unchanged = other_buffer->text->gpt; |
| 2480 | { | 2479 | { |
| 2481 | ptrdiff_t tmp = current_buffer->text->unchanged_size; | ||
| 2482 | current_buffer->text->unchanged_size = other_buffer->text->unchanged_size; | ||
| 2483 | other_buffer->text->unchanged_size = tmp; | ||
| 2484 | } | ||
| 2485 | { | ||
| 2486 | struct Lisp_Marker *m; | 2480 | struct Lisp_Marker *m; |
| 2487 | for (m = BUF_MARKERS (current_buffer); m; m = m->next) | 2481 | for (m = BUF_MARKERS (current_buffer); m; m = m->next) |
| 2488 | if (m->buffer == other_buffer) | 2482 | if (m->buffer == other_buffer) |
diff --git a/src/buffer.h b/src/buffer.h index c2dca0a10c1..09daa29992a 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -144,9 +144,6 @@ enum { BEG = 1, BEG_BYTE = BEG }; | |||
| 144 | #define BUF_UNCHANGED_MODIFIED(buf) \ | 144 | #define BUF_UNCHANGED_MODIFIED(buf) \ |
| 145 | ((buf)->text->unchanged_modified) | 145 | ((buf)->text->unchanged_modified) |
| 146 | 146 | ||
| 147 | #define BUF_UNCHANGED_SIZE(buf) \ | ||
| 148 | ((buf)->text->unchanged_size) | ||
| 149 | |||
| 150 | #define BUF_OVERLAY_UNCHANGED_MODIFIED(buf) \ | 147 | #define BUF_OVERLAY_UNCHANGED_MODIFIED(buf) \ |
| 151 | ((buf)->text->overlay_unchanged_modified) | 148 | ((buf)->text->overlay_unchanged_modified) |
| 152 | #define BUF_BEG_UNCHANGED(buf) ((buf)->text->beg_unchanged) | 149 | #define BUF_BEG_UNCHANGED(buf) ((buf)->text->beg_unchanged) |
| @@ -270,9 +267,6 @@ struct buffer_text | |||
| 270 | end_unchanged contain no useful information. */ | 267 | end_unchanged contain no useful information. */ |
| 271 | modiff_count overlay_unchanged_modified; | 268 | modiff_count overlay_unchanged_modified; |
| 272 | 269 | ||
| 273 | /* Buffer size as of last redisplay that finished. */ | ||
| 274 | ptrdiff_t unchanged_size; | ||
| 275 | |||
| 276 | /* Properties of this buffer's text. */ | 270 | /* Properties of this buffer's text. */ |
| 277 | INTERVAL intervals; | 271 | INTERVAL intervals; |
| 278 | 272 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index ee34487a444..ec01375e1f8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -17074,7 +17074,6 @@ mark_window_display_accurate_1 (struct window *w, bool accurate_p) | |||
| 17074 | BUF_OVERLAY_UNCHANGED_MODIFIED (b) = BUF_OVERLAY_MODIFF (b); | 17074 | BUF_OVERLAY_UNCHANGED_MODIFIED (b) = BUF_OVERLAY_MODIFF (b); |
| 17075 | BUF_BEG_UNCHANGED (b) = BUF_GPT (b) - BUF_BEG (b); | 17075 | BUF_BEG_UNCHANGED (b) = BUF_GPT (b) - BUF_BEG (b); |
| 17076 | BUF_END_UNCHANGED (b) = BUF_Z (b) - BUF_GPT (b); | 17076 | BUF_END_UNCHANGED (b) = BUF_Z (b) - BUF_GPT (b); |
| 17077 | BUF_UNCHANGED_SIZE (b) = BUF_Z (b) - BUF_BEG (b); | ||
| 17078 | 17077 | ||
| 17079 | w->current_matrix->buffer = b; | 17078 | w->current_matrix->buffer = b; |
| 17080 | w->current_matrix->begv = BUF_BEGV (b); | 17079 | w->current_matrix->begv = BUF_BEGV (b); |
| @@ -19294,9 +19293,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) | |||
| 19294 | /* Check whether the buffer to be displayed contains long lines. */ | 19293 | /* Check whether the buffer to be displayed contains long lines. */ |
| 19295 | if (!NILP (Vlong_line_threshold) | 19294 | if (!NILP (Vlong_line_threshold) |
| 19296 | && !current_buffer->long_line_optimizations_p | 19295 | && !current_buffer->long_line_optimizations_p |
| 19297 | && (MODIFF - UNCHANGED_MODIFIED > 4 | 19296 | && MODIFF != UNCHANGED_MODIFIED) |
| 19298 | || Z - BEG - BUF_UNCHANGED_SIZE (current_buffer) > 1 | ||
| 19299 | || Z - BEG - BUF_UNCHANGED_SIZE (current_buffer) < -1)) | ||
| 19300 | { | 19297 | { |
| 19301 | ptrdiff_t cur, next, found, max = 0; | 19298 | ptrdiff_t cur, next, found, max = 0; |
| 19302 | for (cur = 1; cur < Z; cur = next) | 19299 | for (cur = 1; cur < Z; cur = next) |