From: handa Date: Fri, 11 Nov 2005 11:52:57 +0000 (+0000) Subject: (surrounding_text_handler): Directly delete characters X-Git-Tag: REL-1-3-0~75 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ae01e69aeb88b7568f248b4b938190ffb752632b;p=m17n%2Fm17n-lib.git (surrounding_text_handler): Directly delete characters instead of calling delete_char. --- diff --git a/example/medit.c b/example/medit.c index 3789067..6c4bf3f 100644 --- a/example/medit.c +++ b/example/medit.c @@ -508,7 +508,6 @@ update_cursor (int pos, int full) { MDrawMetric rect; - control.cursor_pos = pos; if (full) { /* CUR is inaccurate. We can trust only TOP. */ @@ -2204,13 +2203,13 @@ surrounding_text_handler (MInputContext *ic, MSymbol command) { if (cursor.from + len < 0) len = - cursor.from; - delete_char (len); + mtext_del (mt, cursor.from + len, cursor.from); } else if (len > 0) { if (cursor.from + len > nchars) len = nchars - cursor.from; - delete_char (len); + mtext_del (mt, cursor.from, cursor.from + len); } } }