aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-06-03 13:49:44 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-06-03 13:49:44 +0000
commitfa4f55fae629bca4f6b2fc0010aa249af32cdd3d (patch)
tree380ffaf99cc58cbe5952ceb4d3127d8ca7ba3335
parente356149db43d8e43a6bd1070d6eba645a8b6de8c (diff)
downloaddzen-fa4f55fae629bca4f6b2fc0010aa249af32cdd3d.tar.gz
dzen-fa4f55fae629bca4f6b2fc0010aa249af32cdd3d.zip
fixed scrolling
git-svn-id: http://dzen.googlecode.com/svn/trunk@54 f2baff5b-bf2c-0410-a398-912abdc3d8b2
-rw-r--r--README7
-rw-r--r--action.c11
2 files changed, 8 insertions, 10 deletions
diff --git a/README b/README
index 3d45f93..cfcc470 100644
--- a/README
+++ b/README
@@ -58,7 +58,7 @@ dzen accepts a couple of options:
-l lines, see (1)
-e events and actions, see (2)
-m menu, see (3)
- -p persistent, never time out
+ -p persist EOF (optional timeout)
-x x position
-y y position
-w width
@@ -157,10 +157,11 @@ Supported actions:
togglestick toggle sticky state
hide hide title window
unhide unhide title window
- scrollup scroll slave window one line up
- scrolldown scroll slave window one line down
raise raise window to view (above all others)
lower lower window (behind all others)
+ scrollhome show head of input
+ scrollup:n scroll slave window n lines up (default n=1)
+ scrolldown:n scroll slave window n lines down (default n=1)
Note: If no events/actions are specified dzen defaults to:
diff --git a/action.c b/action.c
index e1220f2..27ed3cd 100644
--- a/action.c
+++ b/action.c
@@ -201,7 +201,6 @@ a_uncollapse(char * opt[]){
XMapRaised(dzen.dpy, dzen.slave_win.win);
for(i=0; i < dzen.slave_win.max_lines; i++)
XMapRaised(dzen.dpy, dzen.slave_win.line[i]);
- //x_draw_body();
}
return 0;
}
@@ -234,11 +233,10 @@ a_togglestick(char * opt[]) {
int
a_scrollup(char * opt[]) {
- int n;
+ int n=1;
+
if(opt[0])
n = atoi(opt[0]);
- if(!n)
- n = 1;
if(dzen.slave_win.max_lines
&& dzen.slave_win.first_line_vis
@@ -257,11 +255,10 @@ a_scrollup(char * opt[]) {
int
a_scrolldown(char * opt[]) {
- int n;
+ int n=1;
+
if(opt[0])
n = atoi(opt[0]);
- if(!n)
- n = 1;
if(dzen.slave_win.max_lines
&& dzen.slave_win.last_line_vis >= dzen.slave_win.max_lines