aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-23 21:05:52 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-23 21:05:52 +0000
commitcc0b9339cde8f25939b635c63dfc8da490e6248c (patch)
tree3cea0fb3ad995d2ebb7bf1965ccceb172854f2dd /main.c
parentadd emacs_like_lineedit (diff)
downloadw3m-cc0b9339cde8f25939b635c63dfc8da490e6248c.tar.gz
w3m-cc0b9339cde8f25939b635c63dfc8da490e6248c.zip
add vi_prec_num
Diffstat (limited to 'main.c')
-rw-r--r--main.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/main.c b/main.c
index c1de7a9..043e735 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.18 2001/11/23 20:06:40 ukai Exp $ */
+/* $Id: main.c,v 1.19 2001/11/23 21:05:52 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1129,11 +1129,12 @@ void
pgFore(void)
{
#ifdef VI_PREC_NUM
- nscroll(searchKeyNum() * (LASTLINE - 1), B_NORMAL);
-#else /* not VI_PREC_NUM */
- nscroll(prec_num ? searchKeyNum() : searchKeyNum() * (LASTLINE - 1),
- prec_num ? B_SCROLL : B_NORMAL);
-#endif /* not VI_PREC_NUM */
+ if (vi_prec_num)
+ nscroll(searchKeyNum() * (LASTLINE - 1), B_NORMAL);
+ else
+#endif
+ nscroll(prec_num ? searchKeyNum() : searchKeyNum() * (LASTLINE - 1),
+ prec_num ? B_SCROLL : B_NORMAL);
}
/* Move page backward */
@@ -1141,11 +1142,12 @@ void
pgBack(void)
{
#ifdef VI_PREC_NUM
- nscroll(- searchKeyNum() * (LASTLINE - 1), B_NORMAL);
-#else /* not VI_PREC_NUM */
- nscroll(- (prec_num ? searchKeyNum() : searchKeyNum() * (LASTLINE - 1)),
- prec_num ? B_SCROLL : B_NORMAL);
-#endif /* not VI_PREC_NUM */
+ if (vi_prec_num)
+ nscroll(- searchKeyNum() * (LASTLINE - 1), B_NORMAL);
+ else
+#endif
+ nscroll(-(prec_num ? searchKeyNum() : searchKeyNum() * (LASTLINE - 1)),
+ prec_num ? B_SCROLL : B_NORMAL);
}
/* 1 line up */