aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorGregory Heytings2022-08-23 15:41:05 +0000
committerGregory Heytings2022-08-23 17:48:51 +0200
commit1c837c42c22181e5fe998c7ea1c6e12c4e711872 (patch)
tree92a5356d1db303524b7ea83efcc34bd6e8bf2617 /src/buffer.c
parent5d3a99602f15372b305d04c6a732e5c69bbe0c5d (diff)
downloademacs-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.c')
-rw-r--r--src/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 4fd5b2be3e9..d4a0c37bed5 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -597,6 +597,7 @@ even if it is dead. The return value is never nil. */)
597 set_buffer_intervals (b, NULL); 597 set_buffer_intervals (b, NULL);
598 BUF_UNCHANGED_MODIFIED (b) = 1; 598 BUF_UNCHANGED_MODIFIED (b) = 1;
599 BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1; 599 BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1;
600 BUF_CHARS_UNCHANGED_MODIFIED (b) = 1;
600 BUF_END_UNCHANGED (b) = 0; 601 BUF_END_UNCHANGED (b) = 0;
601 BUF_BEG_UNCHANGED (b) = 0; 602 BUF_BEG_UNCHANGED (b) = 0;
602 *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */ 603 *(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */