multiple characters.
(surrounding_text_handler): Check number characters to delete.
from = cursor.from, to = from + n;
else
{
+ from = cursor.from + n;
+ to = cursor.from;
if (cursor.from == cur.from)
{
/* We are at the beginning of line. */
reseat (info.line_from);
}
update_cursor (pos, 1);
- from = cursor.from;
- to = cursor.to;
- }
- else
- {
- from = cursor.from - 1;
- to = cursor.from;
}
}
{
int len = (int) mplist_value (ic->plist);
- if (len != 0)
- delete_char (len);
+ if (len < 0)
+ {
+ if (corsor.from + len < 0)
+ len = - corsor.from;
+ delete_char (len);
+ }
+ else if (len > 0)
+ {
+ if (corsor.from + len > nchars)
+ len = nchars - corsor.from;
+ delete_char (len);
+ }
}
}