diff options
author | arg@mig29 <unknown> | 2006-12-14 09:30:23 +0100 |
---|---|---|
committer | arg@mig29 <unknown> | 2006-12-14 09:30:23 +0100 |
commit | 225cd764c321b3c33f6da892a7599e4e8d86ab85 (patch) | |
tree | 4a387dc9538894fbbe9e2dbaf84556f3c528909a | |
parent | 279966a16f32c60f698bf70161c243c4cd1f1c5e (diff) |
applied hotfix of sander
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | main.c | 22 |
2 files changed, 14 insertions, 10 deletions
@@ -1,5 +1,5 @@ | |||
1 | # dmenu version | 1 | # dmenu version |
2 | VERSION = 1.7 | 2 | VERSION = 1.7.1 |
3 | 3 | ||
4 | # Customize below to fit your system | 4 | # Customize below to fit your system |
5 | 5 | ||
@@ -200,11 +200,13 @@ kpress(XKeyEvent * e) { | |||
200 | } | 200 | } |
201 | break; | 201 | break; |
202 | case XK_End: | 202 | case XK_End: |
203 | if(!sel) | ||
204 | return; | ||
203 | while(next) { | 205 | while(next) { |
204 | sel = curr = next; | 206 | sel = curr = next; |
205 | calcoffsets(); | 207 | calcoffsets(); |
206 | } | 208 | } |
207 | while(sel->right) | 209 | while(sel && sel->right) |
208 | sel = sel->right; | 210 | sel = sel->right; |
209 | break; | 211 | break; |
210 | case XK_Escape: | 212 | case XK_Escape: |
@@ -212,6 +214,8 @@ kpress(XKeyEvent * e) { | |||
212 | running = False; | 214 | running = False; |
213 | break; | 215 | break; |
214 | case XK_Home: | 216 | case XK_Home: |
217 | if(!item) | ||
218 | return; | ||
215 | sel = curr = item; | 219 | sel = curr = item; |
216 | calcoffsets(); | 220 | calcoffsets(); |
217 | break; | 221 | break; |
@@ -225,16 +229,16 @@ kpress(XKeyEvent * e) { | |||
225 | } | 229 | } |
226 | break; | 230 | break; |
227 | case XK_Next: | 231 | case XK_Next: |
228 | if(next) { | 232 | if(!next) |
229 | sel = curr = next; | 233 | return; |
230 | calcoffsets(); | 234 | sel = curr = next; |
231 | } | 235 | calcoffsets(); |
232 | break; | 236 | break; |
233 | case XK_Prior: | 237 | case XK_Prior: |
234 | if(prev) { | 238 | if(!prev) |
235 | sel = curr = prev; | 239 | return; |
236 | calcoffsets(); | 240 | sel = curr = prev; |
237 | } | 241 | calcoffsets(); |
238 | break; | 242 | break; |
239 | case XK_Return: | 243 | case XK_Return: |
240 | if((e->state & ShiftMask) && text) | 244 | if((e->state & ShiftMask) && text) |