Mercurial > emacs
changeset 54240:867a22140904
(compute_motion): Save vpos in prev_vpos, like hpos etc.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 02 Mar 2004 16:04:32 +0000 |
parents | 6a449e79b94f |
children | d03a6d1ad7ac |
files | src/indent.c |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/indent.c Tue Mar 02 15:57:05 2004 +0000 +++ b/src/indent.c Tue Mar 02 16:04:32 2004 +0000 @@ -1197,7 +1197,6 @@ = (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); @@ -1225,6 +1224,8 @@ 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. */ @@ -1273,6 +1274,7 @@ pos = prev_pos; pos_byte = prev_pos_byte; hpos = prev_hpos; + vpos = prev_vpos; tab_offset = prev_tab_offset; } break; @@ -1382,6 +1384,7 @@ if (pos >= next_boundary) next_boundary = pos + 1; prev_hpos = width; + prev_vpos = vpos; prev_tab_offset = tab_offset; } } @@ -1414,6 +1417,7 @@ 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. @@ -1434,10 +1438,6 @@ 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; } @@ -1455,6 +1455,7 @@ pos = prev_pos; pos_byte = prev_pos_byte; hpos = prev_hpos; + vpos = prev_vpos; tab_offset = prev_tab_offset; } break; @@ -1463,6 +1464,7 @@ break; prev_hpos = hpos; + prev_vpos = vpos; prev_pos = pos; prev_pos_byte = pos_byte; wide_column_end_hpos = 0;