aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2007-06-04 13:21:10 +0000
committerDai Sato <satodai@w3m.jp>2007-06-04 13:21:10 +0000
commit40db8c3500cad4bfbe68723dd7cbc97e8d7eaa54 (patch)
tree25e76692f5858b8f6e75e068bc8a981e7f66a1b4 /main.c
parentw3m 0.5.2 release (diff)
downloadw3m-40db8c3500cad4bfbe68723dd7cbc97e8d7eaa54.tar.gz
w3m-40db8c3500cad4bfbe68723dd7cbc97e8d7eaa54.zip
make number prefixes working, when vi_prec_num=0.
Diffstat (limited to '')
-rw-r--r--main.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/main.c b/main.c
index fed8c55..361dc20 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.258 2007/05/31 01:19:50 inu Exp $ */
+/* $Id: main.c,v 1.259 2007/06/04 13:21:10 inu Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1152,18 +1152,11 @@ main(int argc, char **argv, char **envp)
mouse_inactive();
#endif /* USE_MOUSE */
if (IS_ASCII(c)) { /* Ascii */
- 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;
- }
+ if (('0' <= c) && (c <= '9') &&
+ (prec_num || (GlobalKeymap[c] == FUNCNAME_nulcmd))) {
+ prec_num = prec_num * 10 + (int)(c - '0');
+ if (prec_num > PREC_LIMIT)
+ prec_num = PREC_LIMIT;
}
else {
set_buffer_environ(Currentbuf);