* input.c (marker_code): New arg surrounding. Callers changed.
(surrounding_pos): Check if name[0] == '@'.
(integer_value): Fix for the change semantics of `@-N' and `@+N'.
+ (take_action_list): Likewise.
2006-10-19 Kenichi Handa <handa@m17n.org>
&& (pos = surrounding_pos (MPLIST_SYMBOL (args))) != 0)
{
delete_surrounding_text (ic, pos);
+ to = ic->cursor_pos + pos;
+ if (to < 0)
+ {
+ delete_surrounding_text (ic, to);
+ to = 0;
+ }
+ else if (to > len)
+ {
+ delete_surrounding_text (ic, to - len);
+ to = len;
+ }
}
else
{
to = 0;
else if (to > len)
to = len;
- MDEBUG_PRINT1 ("(%d)", to - ic->cursor_pos);
- if (to < ic->cursor_pos)
- preedit_delete (ic, to, ic->cursor_pos);
- else if (to > ic->cursor_pos)
- preedit_delete (ic, ic->cursor_pos, to);
}
+ MDEBUG_PRINT1 ("(%d)", to - ic->cursor_pos);
+ if (to < ic->cursor_pos)
+ preedit_delete (ic, to, ic->cursor_pos);
+ else if (to > ic->cursor_pos)
+ preedit_delete (ic, ic->cursor_pos, to);
}
else if (name == Mmove)
{