From 6eae87c765653f7decc2f8c145234eec1d91a16e Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 21 Dec 2004 07:14:39 +0000 Subject: [PATCH] (integer_value): Fix typo ('>' -> '<') and calculation of length of preedit text. --- src/input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index 4faac92..9f738ab 100644 --- a/src/input.c +++ b/src/input.c @@ -239,7 +239,7 @@ integer_value (MInputContext *ic, MPlist *arg) MInputContextInfo *ic_info = (MInputContextInfo *) ic->info; int code; MText *preedit = ic->preedit; - int len = mtext_nbytes (preedit); + int len = mtext_nchars (preedit); if (MPLIST_INTEGER_P (arg)) return MPLIST_INTEGER (arg); @@ -256,7 +256,7 @@ integer_value (MInputContext *ic, MPlist *arg) code = ic->cursor_pos + 1; else if (code == '<') code = 0; - else if (code == '<') + else if (code == '>') code = len; return (code >= 0 && code < len ? mtext_ref_char (preedit, code) : -1); } -- 1.7.10.4