Commit dea4d2e6 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(current_column, Fmove_to_column, compute_motion):

Expect display table elts to be vectors.
parent 80ec1ba2
...@@ -137,7 +137,7 @@ current_column () ...@@ -137,7 +137,7 @@ current_column ()
c = *--ptr; c = *--ptr;
if (c >= 040 && c < 0177 if (c >= 040 && c < 0177
&& (dp == 0 || XTYPE (DISP_CHAR_ROPE (dp, c)) != Lisp_String)) && (dp == 0 || XTYPE (DISP_CHAR_VECTOR (dp, c)) != Lisp_Vector))
{ {
col++; col++;
} }
...@@ -154,8 +154,8 @@ current_column () ...@@ -154,8 +154,8 @@ current_column ()
col = 0; col = 0;
tab_seen = 1; tab_seen = 1;
} }
else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String) else if (dp != 0 && XTYPE (DISP_CHAR_VECTOR (dp, c)) == Lisp_Vector)
col += XSTRING (DISP_CHAR_ROPE (dp, c))->size / sizeof (GLYPH); col += XVECTOR (DISP_CHAR_VECTOR (dp, c))->size;
else else
col += (ctl_arrow && c < 0200) ? 2 : 4; col += (ctl_arrow && c < 0200) ? 2 : 4;
} }
...@@ -329,8 +329,8 @@ and if COLUMN is in the middle of a tab character, change it to spaces.") ...@@ -329,8 +329,8 @@ and if COLUMN is in the middle of a tab character, change it to spaces.")
col += tab_width; col += tab_width;
col = col / tab_width * tab_width; col = col / tab_width * tab_width;
} }
else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String) else if (dp != 0 && XTYPE (DISP_CHAR_VECTOR (dp, c)) == Lisp_Vector)
col += XSTRING (DISP_CHAR_ROPE (dp, c))->size / sizeof (GLYPH); col += XVECTOR (DISP_CHAR_VECTOR (dp, c))->size;
else if (ctl_arrow && (c < 040 || c == 0177)) else if (ctl_arrow && (c < 040 || c == 0177))
col++; col++;
else if (c < 040 || c >= 0177) else if (c < 040 || c >= 0177)
...@@ -434,8 +434,8 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta ...@@ -434,8 +434,8 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
: !NILP (current_buffer->selective_display) ? -1 : 0; : !NILP (current_buffer->selective_display) ? -1 : 0;
int prev_vpos, prev_hpos; int prev_vpos, prev_hpos;
int selective_rlen int selective_rlen
= (selective && dp && XTYPE (DISP_INVIS_ROPE (dp)) == Lisp_String = (selective && dp && XTYPE (DISP_INVIS_VECTOR (dp)) == Lisp_Vector
? XSTRING (DISP_INVIS_ROPE (dp))->size / sizeof (GLYPH) : 0); ? XVECTOR (DISP_INVIS_VECTOR (dp))->size : 0);
if (tab_width <= 0 || tab_width > 20) tab_width = 8; if (tab_width <= 0 || tab_width > 20) tab_width = 8;
for (pos = from; pos < to; pos++) for (pos = from; pos < to; pos++)
...@@ -450,7 +450,7 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta ...@@ -450,7 +450,7 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
c = FETCH_CHAR (pos); c = FETCH_CHAR (pos);
if (c >= 040 && c < 0177 if (c >= 040 && c < 0177
&& (dp == 0 || XTYPE (DISP_CHAR_ROPE (dp, c)) != Lisp_String)) && (dp == 0 || XTYPE (DISP_CHAR_VECTOR (dp, c)) != Lisp_Vector))
hpos++; hpos++;
else if (c == '\t') else if (c == '\t')
{ {
...@@ -506,8 +506,8 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta ...@@ -506,8 +506,8 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
hpos = width; hpos = width;
} }
} }
else if (dp != 0 && XTYPE (DISP_CHAR_ROPE (dp, c)) == Lisp_String) else if (dp != 0 && XTYPE (DISP_CHAR_VECTOR (dp, c)) == Lisp_Vector)
hpos += XSTRING (DISP_CHAR_ROPE (dp, c))->size / sizeof (GLYPH); hpos += XVECTOR (DISP_CHAR_VECTOR (dp, c))->size;
else else
hpos += (ctl_arrow && c < 0200) ? 2 : 4; hpos += (ctl_arrow && c < 0200) ? 2 : 4;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment