Actually improve detection of long lines
* src/xdisp.c (redisplay_window): Update condition.
* src/xdisp.c (mark_window_display_accurate_1):
* src/pdumper.c (dump_buffer):
* src/buffer.h (BUF_CHARS_UNCHANGED_MODIFIED):
(struct buffer_text):
* src/buffer.c (Fget_buffer_create):
Revert 1c837c42c2
, which was misguided.
This commit is contained in:
parent
118465f6fe
commit
7d787564c0
4 changed files with 1 additions and 15 deletions
|
@ -604,7 +604,6 @@ even if it is dead. The return value is never nil. */)
|
|||
set_buffer_intervals (b, NULL);
|
||||
BUF_UNCHANGED_MODIFIED (b) = 1;
|
||||
BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1;
|
||||
BUF_CHARS_UNCHANGED_MODIFIED (b) = 1;
|
||||
BUF_END_UNCHANGED (b) = 0;
|
||||
BUF_BEG_UNCHANGED (b) = 0;
|
||||
*(BUF_GPT_ADDR (b)) = *(BUF_Z_ADDR (b)) = 0; /* Put an anchor '\0'. */
|
||||
|
|
11
src/buffer.h
11
src/buffer.h
|
@ -149,18 +149,12 @@ enum { BEG = 1, BEG_BYTE = BEG };
|
|||
#define BUF_BEG_UNCHANGED(buf) ((buf)->text->beg_unchanged)
|
||||
#define BUF_END_UNCHANGED(buf) ((buf)->text->end_unchanged)
|
||||
|
||||
#define BUF_CHARS_UNCHANGED_MODIFIED(buf) \
|
||||
((buf)->text->chars_unchanged_modified)
|
||||
|
||||
#define UNCHANGED_MODIFIED \
|
||||
BUF_UNCHANGED_MODIFIED (current_buffer)
|
||||
#define OVERLAY_UNCHANGED_MODIFIED \
|
||||
BUF_OVERLAY_UNCHANGED_MODIFIED (current_buffer)
|
||||
#define BEG_UNCHANGED BUF_BEG_UNCHANGED (current_buffer)
|
||||
#define END_UNCHANGED BUF_END_UNCHANGED (current_buffer)
|
||||
|
||||
#define CHARS_UNCHANGED_MODIFIED \
|
||||
BUF_CHARS_UNCHANGED_MODIFIED (current_buffer)
|
||||
|
||||
/* Functions to set PT in the current buffer, or another buffer. */
|
||||
|
||||
|
@ -274,11 +268,6 @@ struct buffer_text
|
|||
end_unchanged contain no useful information. */
|
||||
modiff_count overlay_unchanged_modified;
|
||||
|
||||
/* CHARS_MODIFF as of last redisplay that finished. It's used
|
||||
when we only care about changes in actual buffer text, not in
|
||||
any other kind of changes, like properties etc. */
|
||||
modiff_count chars_unchanged_modified;
|
||||
|
||||
/* Properties of this buffer's text. */
|
||||
INTERVAL intervals;
|
||||
|
||||
|
|
|
@ -2811,7 +2811,6 @@ dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer)
|
|||
DUMP_FIELD_COPY (out, buffer, own_text.end_unchanged);
|
||||
DUMP_FIELD_COPY (out, buffer, own_text.unchanged_modified);
|
||||
DUMP_FIELD_COPY (out, buffer, own_text.overlay_unchanged_modified);
|
||||
DUMP_FIELD_COPY (out, buffer, own_text.chars_unchanged_modified);
|
||||
if (buffer->own_text.intervals)
|
||||
dump_field_fixup_later (ctx, out, buffer, &buffer->own_text.intervals);
|
||||
dump_field_lv_rawptr (ctx, out, buffer, &buffer->own_text.markers,
|
||||
|
|
|
@ -17264,7 +17264,6 @@ mark_window_display_accurate_1 (struct window *w, bool accurate_p)
|
|||
|
||||
BUF_UNCHANGED_MODIFIED (b) = BUF_MODIFF (b);
|
||||
BUF_OVERLAY_UNCHANGED_MODIFIED (b) = BUF_OVERLAY_MODIFF (b);
|
||||
BUF_CHARS_UNCHANGED_MODIFIED (b) = BUF_CHARS_MODIFF (b);
|
||||
BUF_BEG_UNCHANGED (b) = BUF_GPT (b) - BUF_BEG (b);
|
||||
BUF_END_UNCHANGED (b) = BUF_Z (b) - BUF_GPT (b);
|
||||
|
||||
|
@ -19535,7 +19534,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
|
|||
/* Check whether the buffer to be displayed contains long lines. */
|
||||
if (!NILP (Vlong_line_threshold)
|
||||
&& !current_buffer->long_line_optimizations_p
|
||||
&& (CHARS_MODIFF - CHARS_UNCHANGED_MODIFIED > 8
|
||||
&& (CHARS_MODIFF - UNCHANGED_MODIFIED > 8
|
||||
|| current_buffer->clip_changed))
|
||||
{
|
||||
ptrdiff_t cur, next, found, max = 0, threshold;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue