aboutsummaryrefslogtreecommitdiff
path: root/office/fbpdf/navigation.diff
blob: 6280062a6881051d435c5e023074e945995b5512 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -Naur fbpdf-20140822/README fbpdf-20140822.patched/README
--- fbpdf-20140822/README	2014-08-21 21:12:00.000000000 -0400
+++ fbpdf-20140822.patched/README	2014-08-22 04:53:46.000000000 -0400
@@ -28,7 +28,9 @@
 G		go to page (the last page if no prefix)
 o		set page number (for 'G' command only)
 O		set page number and go to current page
-z		zoom; prefix multiplied by 10 (i.e. '15z' = 150%)
+z/=	zoom; prefix multiplied by 10 (i.e. '12z' = 120%). Default 15.
++		increase zoom by 10%
+-		decrease zoom by 10%
 r		set rotation in degrees
 i		print info
 q		quit
diff -Naur fbpdf-20140822/fbpdf.c fbpdf-20140822.patched/fbpdf.c
--- fbpdf-20140822/fbpdf.c	2014-08-21 21:12:00.000000000 -0400
+++ fbpdf-20140822.patched/fbpdf.c	2014-08-22 04:53:56.000000000 -0400
@@ -220,6 +220,7 @@
 			numdiff = num - getcount(num);
 			break;
 		case 'z':
+		case '=':
 			zoom_page(getcount(zoom_def));
 			break;
 		case 'Z':
@@ -288,10 +289,12 @@
 		case ' ':
 		case CTRL('d'):
 			head += fb_rows() * getcount(1) - step;
+			if(head > prows) showpage(num + 1, 0);
 			break;
 		case 127:
 		case CTRL('u'):
 			head -= fb_rows() * getcount(1) - step;
+			if(head < 0) showpage(num - 1, prows - step);
 			break;
 		case '[':
 			left = leftmost(0);
@@ -307,6 +310,14 @@
 			break;
 		case CTRLKEY('l'):
 			break;
+		case '+':
+			count = 0;
+			zoom_page(zoom + 1);
+			break;
+		case '-':
+			count = 0;
+			if(zoom > 0) zoom_page(zoom - 1);
+			break;
 		default:
 			/* no need to redraw */
 			continue;