diff options
author | Dai Sato <satodai@w3m.jp> | 2006-04-08 11:21:07 +0000 |
---|---|---|
committer | Dai Sato <satodai@w3m.jp> | 2006-04-08 11:21:07 +0000 |
commit | dd7ae6dfb818cc2ac292a78a6aa995c13efbebdf (patch) | |
tree | cd2c8e532358ad2e2eac07924d59b79ea6366cb0 /main.c | |
parent | [w3m-dev 04146] disable HAVE_LANGINFO_CODESET on cygwin (diff) | |
download | w3m-dd7ae6dfb818cc2ac292a78a6aa995c13efbebdf.tar.gz w3m-dd7ae6dfb818cc2ac292a78a6aa995c13efbebdf.zip |
[w3m-dev 04150] fix vi_prec_num switching.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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 <signal.h> @@ -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); |