comparison src/xdisp.c @ 19045:59ccb8fd4ee1

(redisplay_window): Fix previous change. (decode_mode_spec_coding): If multibyte chars disabled. display only the eol flag.
author Richard M. Stallman <rms@gnu.org>
date Wed, 30 Jul 1997 19:44:31 +0000
parents 533ccefb099d
children e2be10e9bf9d
comparison
equal deleted inserted replaced
19044:192305191a1f 19045:59ccb8fd4ee1
1836 && INTEGERP (w->window_end_vpos) 1836 && INTEGERP (w->window_end_vpos)
1837 && XFASTINT (w->window_end_vpos) < XFASTINT (w->height) 1837 && XFASTINT (w->window_end_vpos) < XFASTINT (w->height)
1838 && !EQ (window, minibuf_window)) 1838 && !EQ (window, minibuf_window))
1839 { 1839 {
1840 int this_scroll_margin = scroll_margin; 1840 int this_scroll_margin = scroll_margin;
1841 int last_point_y = w->last_point_y - XINT (w->top);
1842 int last_point_x = (w->last_point_x
1843 + (hscroll ? 1 - hscroll : 0)
1844 - WINDOW_LEFT_MARGIN (w));
1841 1845
1842 /* Find where PT is located now on the frame. */ 1846 /* Find where PT is located now on the frame. */
1843 if (PT == w->last_point) 1847 /* Check just_this_one as a way of verifying that the
1844 { 1848 window edges have not changed. */
1845 pos.hpos = (w->last_point_x 1849 if (PT == w->last_point && just_this_one)
1846 + (hscroll ? 1 - hscroll : 0) 1850 {
1847 - WINDOW_LEFT_MARGIN (w)); 1851 pos.hpos = last_point_x;
1848 pos.vpos = w->last_point_y; 1852 pos.vpos = last_point_y;
1849 pos.bufpos = PT; 1853 pos.bufpos = PT;
1850 } 1854 }
1851 else if (PT > w->last_point) 1855 else if (PT > w->last_point && w->last_point > startp && just_this_one)
1852 { 1856 {
1853 pos = *compute_motion (w->last_point, w->last_point_y, 1857 pos = *compute_motion (w->last_point, last_point_y, last_point_x, 0,
1854 w->last_point_x + (hscroll ? 1 - hscroll : 0),
1855 0,
1856 PT, height, 1858 PT, height,
1857 /* BUG FIX: See the comment of 1859 /* BUG FIX: See the comment of
1858 Fpos_visible_in_window_p (window.c). */ 1860 Fpos_visible_in_window_p (window.c). */
1859 - (1 << (BITS_PER_SHORT - 1)), 1861 - (1 << (BITS_PER_SHORT - 1)),
1860 width, hscroll, 1862 width, hscroll,
4103 Lisp_Object coding_system; 4105 Lisp_Object coding_system;
4104 register char *buf; 4106 register char *buf;
4105 int eol_flag; 4107 int eol_flag;
4106 { 4108 {
4107 Lisp_Object val; 4109 Lisp_Object val;
4110 int multibyte = !NILP (current_buffer->enable_multibyte_characters);
4108 4111
4109 val = coding_system; 4112 val = coding_system;
4110 4113
4111 if (NILP (val)) /* Not yet decided. */ 4114 if (NILP (val)) /* Not yet decided. */
4112 { 4115 {
4113 *buf++ = '-'; 4116 if (multibyte)
4117 *buf++ = '-';
4114 if (eol_flag) 4118 if (eol_flag)
4115 *buf++ = eol_mnemonic_undecided; 4119 *buf++ = eol_mnemonic_undecided;
4116 /* Don't mention EOL conversion if it isn't decided. */ 4120 /* Don't mention EOL conversion if it isn't decided. */
4117 } 4121 }
4118 else 4122 else
4126 val = Fget (val, Qcoding_system); 4130 val = Fget (val, Qcoding_system);
4127 if (NILP (eolvalue)) 4131 if (NILP (eolvalue))
4128 eolvalue = Fget (val, Qeol_type); 4132 eolvalue = Fget (val, Qeol_type);
4129 } 4133 }
4130 4134
4131 *buf++ = XFASTINT (XVECTOR (val)->contents[1]); 4135 if (multibyte)
4136 *buf++ = XFASTINT (XVECTOR (val)->contents[1]);
4137
4132 if (eol_flag) 4138 if (eol_flag)
4133 { 4139 {
4134 /* The EOL conversion we are using. */ 4140 /* The EOL conversion we are using. */
4135 int eoltype; 4141 int eoltype;
4136 /* The EOL conversion that is normal on this system. */ 4142 /* The EOL conversion that is normal on this system. */