/* Updating of data structures for redisplay.
- Copyright (C) 1985, 86, 87, 88, 93, 94, 95 Free Software Foundation, Inc.
+ Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 1997
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
unchanged_modified = MODIFF;
beg_unchanged = GPT - BEG;
XSETFASTINT (w->last_point, PT);
- XSETFASTINT (w->last_point_x, hpos);
+ XSETFASTINT (w->last_point_x, hpos + 1);
XSETFASTINT (w->last_modified, MODIFF);
XSETFASTINT (w->last_overlay_modified, OVERLAY_MODIFF);
register FRAME_PTR frame = selected_frame;
register struct window *w = XWINDOW (selected_window);
Lisp_Object position;
- /* This check is redundant. It's checked at "losing cursor" below. */
-#if 0
int hpos = FRAME_CURSOR_X (frame);
/* Give up if in truncated text at end of line. */
+ /* This check is not redundant. */
if (hpos >= WINDOW_LEFT_MARGIN (w) + window_internal_width (w) - 1)
return 0;
-#endif /* 0 */
/* Give up if the buffer's direction is reversed (i.e. right-to-left). */
if (!NILP (XBUFFER(w->buffer)->direction_reversed))
return 0;
old_hash[i] = line_hash_code (current_frame, i);
if (! desired_frame->enable[i])
- new_hash[i] = old_hash[i];
+ {
+ /* This line cannot be redrawn, so don't let scrolling mess it. */
+ new_hash[i] = old_hash[i];
+#define INFINITY 1000000 /* Taken from scroll.c */
+ draw_cost[i] = INFINITY;
+ }
else
- new_hash[i] = line_hash_code (desired_frame, i);
+ {
+ new_hash[i] = line_hash_code (desired_frame, i);
+ draw_cost[i] = line_draw_cost (desired_frame, i);
+ }
if (old_hash[i] != new_hash[i])
{
}
else if (i == unchanged_at_top)
unchanged_at_top++;
- draw_cost[i] = line_draw_cost (desired_frame, i);
old_draw_cost[i] = line_draw_cost (current_frame, i);
}
{
int new_frame_window_width;
unsigned int total_glyphs;
+ int count = specpdl_ptr - specpdl;
/* If we can't deal with the change now, queue it for later. */
if (delay)
UNBLOCK_INPUT;
+ record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
+
/* This isn't quite a no-op: it runs window-configuration-change-hook. */
Fset_window_buffer (FRAME_SELECTED_WINDOW (frame),
XWINDOW (FRAME_SELECTED_WINDOW (frame))->buffer);
+
+ unbind_to (count, Qnil);
}
\f
DEFUN ("send-string-to-terminal", Fsend_string_to_terminal,
display_arg = (display != 0 && *display != 0);
}
- if (!inhibit_window_system && display_arg && initialized)
+ if (!inhibit_window_system && display_arg
+#ifndef CANNOT_DUMP
+ && initialized
+#endif
+ )
{
Vwindow_system = intern ("x");
#ifdef HAVE_X11