+2004-03-02 Richard M. Stallman <rms@gnu.org>
+
+ * indent.c (compute_motion): Save vpos in prev_vpos, like hpos etc.
+
2004-03-02 Kenichi Handa <handa@m17n.org>
* doc.c (Fsubstitute_command_keys): Fix counding bytes.
= (INTEGERP (current_buffer->selective_display)
? XINT (current_buffer->selective_display)
: !NILP (current_buffer->selective_display) ? -1 : 0);
- int prev_hpos = 0;
int selective_rlen
= (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp))
? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0);
int wide_column_end_hpos = 0;
int prev_pos; /* Previous buffer position. */
int prev_pos_byte; /* Previous buffer position. */
+ int prev_hpos = 0;
+ int prev_vpos = 0;
int contin_hpos; /* HPOS of last column of continued line. */
int prev_tab_offset; /* Previous tab offset. */
pos = prev_pos;
pos_byte = prev_pos_byte;
hpos = prev_hpos;
+ vpos = prev_vpos;
tab_offset = prev_tab_offset;
}
break;
if (pos >= next_boundary)
next_boundary = pos + 1;
prev_hpos = width;
+ prev_vpos = vpos;
prev_tab_offset = tab_offset;
}
}
pos = prev_pos;
pos_byte = prev_pos_byte;
hpos = prev_hpos;
+ vpos = prev_vpos;
tab_offset = prev_tab_offset;
/* NOTE on contin_hpos, hpos, and prev_hpos.
hpos = contin_hpos;
vpos = vpos - 1;
}
- else if (c == '\n')
- /* If previous character is NEWLINE,
- set VPOS back to previous line */
- vpos = vpos - 1;
break;
}
pos = prev_pos;
pos_byte = prev_pos_byte;
hpos = prev_hpos;
+ vpos = prev_vpos;
tab_offset = prev_tab_offset;
}
break;
break;
prev_hpos = hpos;
+ prev_vpos = vpos;
prev_pos = pos;
prev_pos_byte = pos_byte;
wide_column_end_hpos = 0;