From dd7ae6dfb818cc2ac292a78a6aa995c13efbebdf Mon Sep 17 00:00:00 2001 From: Dai Sato Date: Sat, 8 Apr 2006 11:21:07 +0000 Subject: [w3m-dev 04150] fix vi_prec_num switching. --- main.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index fa37951..19f29b2 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.249 2006/04/07 13:21:11 inu Exp $ */ +/* $Id: main.c,v 1.250 2006/04/08 11:21:07 inu Exp $ */ #define MAINPROGRAM #include "fm.h" #include @@ -1112,10 +1112,18 @@ main(int argc, char **argv, char **envp) mouse_inactive(); #endif /* USE_MOUSE */ if (IS_ASCII(c)) { /* Ascii */ - if (((prec_num && c == '0') || '1' <= c) && (c <= '9')) { - prec_num = prec_num * 10 + (int)(c - '0'); - if (prec_num > PREC_LIMIT) - prec_num = PREC_LIMIT; + if( vi_prec_num ){ + if(((prec_num && c == '0') || '1' <= c) && (c <= '9')) { + prec_num = prec_num * 10 + (int)(c - '0'); + if (prec_num > PREC_LIMIT) + prec_num = PREC_LIMIT; + } + else { + set_buffer_environ(Currentbuf); + save_buffer_position(Currentbuf); + keyPressEventProc((int)c); + prec_num = 0; + } } else { set_buffer_environ(Currentbuf); -- cgit v1.2.3