summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-07-30 19:44:31 +0000
committerRichard M. Stallman <rms@gnu.org>1997-07-30 19:44:31 +0000
commit6a343d1d98e19f81e5699ce3482bda97a0cfe31b (patch)
tree435422cbdff2da6d6924f3e75264c2f33a169660
parenta778fa7232b32472cb02caec0fce608914b7cb82 (diff)
downloademacs-6a343d1d98e19f81e5699ce3482bda97a0cfe31b.tar.gz
(redisplay_window): Fix previous change.
(decode_mode_spec_coding): If multibyte chars disabled. display only the eol flag.
-rw-r--r--src/xdisp.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index d0fa8a16e39..c0b94ccaf8b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1838,21 +1838,23 @@ redisplay_window (window, just_this_one, preserve_echo_area)
&& !EQ (window, minibuf_window))
{
int this_scroll_margin = scroll_margin;
+ int last_point_y = w->last_point_y - XINT (w->top);
+ int last_point_x = (w->last_point_x
+ + (hscroll ? 1 - hscroll : 0)
+ - WINDOW_LEFT_MARGIN (w));
/* Find where PT is located now on the frame. */
- if (PT == w->last_point)
+ /* Check just_this_one as a way of verifying that the
+ window edges have not changed. */
+ if (PT == w->last_point && just_this_one)
{
- pos.hpos = (w->last_point_x
- + (hscroll ? 1 - hscroll : 0)
- - WINDOW_LEFT_MARGIN (w));
- pos.vpos = w->last_point_y;
+ pos.hpos = last_point_x;
+ pos.vpos = last_point_y;
pos.bufpos = PT;
}
- else if (PT > w->last_point)
+ else if (PT > w->last_point && w->last_point > startp && just_this_one)
{
- pos = *compute_motion (w->last_point, w->last_point_y,
- w->last_point_x + (hscroll ? 1 - hscroll : 0),
- 0,
+ pos = *compute_motion (w->last_point, last_point_y, last_point_x, 0,
PT, height,
/* BUG FIX: See the comment of
Fpos_visible_in_window_p (window.c). */
@@ -4105,12 +4107,14 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
int eol_flag;
{
Lisp_Object val;
+ int multibyte = !NILP (current_buffer->enable_multibyte_characters);
val = coding_system;
if (NILP (val)) /* Not yet decided. */
{
- *buf++ = '-';
+ if (multibyte)
+ *buf++ = '-';
if (eol_flag)
*buf++ = eol_mnemonic_undecided;
/* Don't mention EOL conversion if it isn't decided. */
@@ -4128,7 +4132,9 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
eolvalue = Fget (val, Qeol_type);
}
- *buf++ = XFASTINT (XVECTOR (val)->contents[1]);
+ if (multibyte)
+ *buf++ = XFASTINT (XVECTOR (val)->contents[1]);
+
if (eol_flag)
{
/* The EOL conversion we are using. */