1 |
wired 12/01/02 13:25:59 |
2 |
|
3 |
Added: rxvt-unicode-9.14-clear.patch |
4 |
rxvt-unicode-9.14-secondary-wheel.patch |
5 |
Log: |
6 |
added a -vanilla patch that fixes ctrl-l not storing cleared lines to buffer and a USE flag controlled patch (secondary-wheel) that allows scrolling in secondary screens (like mutt) by using the mouse wheel. |
7 |
|
8 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-clear.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: rxvt-unicode-9.14-clear.patch |
17 |
=================================================================== |
18 |
store visible lines to buffer before clearing the screen when pressing ctrl-l |
19 |
|
20 |
patch by rlblaster |
21 |
https://bbs.archlinux.org/viewtopic.php?id=129302 |
22 |
|
23 |
--- a/src/command.C |
24 |
+++ b/src/command.C |
25 |
@@ -2932,6 +2932,17 @@ |
26 |
|
27 |
case CSI_CUP: /* 8.3.21: (1,1) CURSOR POSITION */ |
28 |
case CSI_HVP: /* 8.3.64: (1,1) CHARACTER AND LINE POSITION */ |
29 |
+ if (nargs == 1 && current_screen == 0) |
30 |
+ { |
31 |
+ // This is usually followed with clear screen so add some extra |
32 |
+ // lines to avoid deleting the lines already on screen. If we are |
33 |
+ // already at the top, add an extra screen height of lines. |
34 |
+ int extra_lines = nrow-1; |
35 |
+ if (screen.cur.row == 0) |
36 |
+ extra_lines += nrow; |
37 |
+ for (int i = 0; i < extra_lines; ++i) |
38 |
+ scr_add_lines (L"\r\n", 2); |
39 |
+ } |
40 |
scr_gotorc (arg[0] - 1, nargs < 2 ? 0 : (arg[1] - 1), 0); |
41 |
break; |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
1.1 x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch |
47 |
|
48 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.14-secondary-wheel.patch?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: rxvt-unicode-9.14-secondary-wheel.patch |
52 |
=================================================================== |
53 |
secondary wheel support: |
54 |
when using the mouse wheel, if you’re on secondary screen then no scrolling |
55 |
will occur, and instead some (3, to be exact) “fake” keystrokes will be sent to |
56 |
the running application. |
57 |
|
58 |
patch by jacky |
59 |
i.am.jack.mail@×××××.com |
60 |
http://lists.schmorp.de/pipermail/rxvt-unicode/2011q4/001491.html |
61 |
|
62 |
diff -r d5f9ea7306c4 -r cca1997c1a85 doc/rxvt.1.pod |
63 |
--- a/doc/rxvt.1.pod Wed Dec 21 22:59:04 2011 +0100 |
64 |
+++ b/doc/rxvt.1.pod Wed Dec 21 23:01:28 2011 +0100 |
65 |
@@ -455,6 +455,11 @@ |
66 |
Turn on/off secondary screen scroll (default enabled); resource |
67 |
B<secondaryScroll>. |
68 |
|
69 |
+=item B<-ssw>|B<+ssw> |
70 |
+ |
71 |
+Turn on/off secondary screen wheel support (default disabled); resource |
72 |
+B<secondaryWheel>. |
73 |
+ |
74 |
=item B<-hold>|B<+hold> |
75 |
|
76 |
Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@ |
77 |
@@ -1167,6 +1172,13 @@ |
78 |
scrollback buffer and, when secondaryScreen is off, switching |
79 |
to/from the secondary screen will instead scroll the screen up. |
80 |
|
81 |
+=item B<secondaryWheel:> I<boolean> |
82 |
+ |
83 |
+Turn on/off secondary wheel (default disabled). If enabled, when on |
84 |
+secondary screen, using the mouse wheel will not scroll in the buffer |
85 |
+but instead send 3 "fake" keystrokes (Up/Down arrow) to the running |
86 |
+application (allows e.g. natural scrolling in B<man>, B<less>, etc). |
87 |
+ |
88 |
=item B<hold>: I<boolean> |
89 |
|
90 |
Turn on/off hold window after exit support. If enabled, @@RXVT_NAME@@ |
91 |
diff -r d5f9ea7306c4 -r cca1997c1a85 src/command.C |
92 |
--- a/src/command.C Wed Dec 21 22:59:04 2011 +0100 |
93 |
+++ b/src/command.C Wed Dec 21 23:01:28 2011 +0100 |
94 |
@@ -2197,10 +2197,46 @@ |
95 |
} |
96 |
else |
97 |
# endif |
98 |
+#ifndef NO_SECONDARY_SCREEN |
99 |
{ |
100 |
- scr_page (v, i); |
101 |
- scrollBar.show (1); |
102 |
+ /* on SECONDARY screen, we send "fake" UP/DOWN keys instead |
103 |
+ * (this allows to scroll within man, less, etc) */ |
104 |
+ if (option (Opt_secondaryWheel) && current_screen != PRIMARY) |
105 |
+ { |
106 |
+ XKeyEvent event; |
107 |
+ event.display = ev.display; |
108 |
+ event.window = ev.window; |
109 |
+ event.root = ev.root; |
110 |
+ event.subwindow = ev.subwindow; |
111 |
+ event.time = ev.time; |
112 |
+ event.x = ev.x; |
113 |
+ event.y = ev.y; |
114 |
+ event.x_root = ev.x_root; |
115 |
+ event.y_root = ev.y_root; |
116 |
+ event.same_screen = ev.same_screen; |
117 |
+ event.state = 0; |
118 |
+ event.keycode = XKeysymToKeycode(ev.display, |
119 |
+ (v == UP) ? XK_Up : XK_Down); |
120 |
+ for (i = 0; i < 3; ++i) |
121 |
+ { |
122 |
+ event.type = KeyPress; |
123 |
+ XSendEvent (event.display, event.window, True, |
124 |
+ KeyPressMask, (XEvent *) &event); |
125 |
+ event.type = KeyRelease; |
126 |
+ XSendEvent (event.display, event.window, True, |
127 |
+ KeyPressMask, (XEvent *) &event); |
128 |
+ } |
129 |
+ } |
130 |
+ /* on PRIMARY screen, we scroll in the buffer */ |
131 |
+ else |
132 |
+#endif |
133 |
+ { |
134 |
+ scr_page (v, i); |
135 |
+ scrollBar.show (1); |
136 |
+ } |
137 |
+#ifndef NO_SECONDARY_SCREEN |
138 |
} |
139 |
+#endif |
140 |
} |
141 |
break; |
142 |
#endif |
143 |
diff -r d5f9ea7306c4 -r cca1997c1a85 src/optinc.h |
144 |
--- a/src/optinc.h Wed Dec 21 22:59:04 2011 +0100 |
145 |
+++ b/src/optinc.h Wed Dec 21 23:01:28 2011 +0100 |
146 |
@@ -26,6 +26,7 @@ |
147 |
def(cursorBlink) |
148 |
def(secondaryScreen) |
149 |
def(secondaryScroll) |
150 |
+ def(secondaryWheel) |
151 |
def(pastableTabs) |
152 |
def(cursorUnderline) |
153 |
#if ENABLE_FRILLS |
154 |
diff -r d5f9ea7306c4 -r cca1997c1a85 src/rsinc.h |
155 |
--- a/src/rsinc.h Wed Dec 21 22:59:04 2011 +0100 |
156 |
+++ b/src/rsinc.h Wed Dec 21 23:01:28 2011 +0100 |
157 |
@@ -102,6 +102,7 @@ |
158 |
#ifndef NO_SECONDARY_SCREEN |
159 |
def (secondaryScreen) |
160 |
def (secondaryScroll) |
161 |
+ def (secondaryWheel) |
162 |
#endif |
163 |
#ifdef OFF_FOCUS_FADING |
164 |
def (fade) |
165 |
diff -r d5f9ea7306c4 -r cca1997c1a85 src/xdefaults.C |
166 |
--- a/src/xdefaults.C Wed Dec 21 22:59:04 2011 +0100 |
167 |
+++ b/src/xdefaults.C Wed Dec 21 23:01:28 2011 +0100 |
168 |
@@ -261,6 +261,7 @@ |
169 |
#ifndef NO_SECONDARY_SCREEN |
170 |
BOOL (Rs_secondaryScreen, "secondaryScreen", "ssc", Opt_secondaryScreen, 0, "enable secondary screen"), |
171 |
BOOL (Rs_secondaryScroll, "secondaryScroll", "ssr", Opt_secondaryScroll, 0, "enable secondary screen scroll"), |
172 |
+ BOOL (Rs_secondaryWheel, "secondaryWheel", "ssw", Opt_secondaryWheel, 0, "enable secondary screen wheel"), |
173 |
#endif |
174 |
#if ENABLE_PERL |
175 |
RSTRG (Rs_perl_lib, "perl-lib", "string"), //, "colon-separated directories with extension scripts"),TODO |