w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit 468bcee48d4b0acee86066179eefc28bb50d3dd6
parent be6bc80f9f0ae31972d7c7af8978fb418e134b0c
Author: inu <inu>
Date:   Sat,  8 Apr 2006 11:21:07 +0000

[w3m-dev 04150] fix vi_prec_num switching.

Diffstat:
MChangeLog | 7++++++-
Mmain.c | 16++++++++++++----
2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,4 +1,9 @@ -2006-04-07 Dai Sato <satodai@w3m.jp> +2006-04-08 Dai Sato <satodai@w3m.jp> + + * [w3m-dev 04150] vi-prec_num + * main.c: fix vi_prec_num switching. + +2006-04-08 Dai Sato <satodai@w3m.jp> * [w3m-dev 04146] disable HAVE_LANGINFO_CODESET on cygwin * configure.ac: avoid AM_LANGINFO_CODESET check for Cygwin. diff --git a/main.c b/main.c @@ -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);