From ae01e69aeb88b7568f248b4b938190ffb752632b Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 11 Nov 2005 11:52:57 +0000 Subject: [PATCH] (surrounding_text_handler): Directly delete characters instead of calling delete_char. --- example/medit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } } } -- 1.7.10.4