aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.mk2
-rw-r--r--main.c22
2 files changed, 14 insertions, 10 deletions
diff --git a/config.mk b/config.mk
index bc89b16..7beebff 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
1# dmenu version 1# dmenu version
2VERSION = 1.7 2VERSION = 1.7.1
3 3
4# Customize below to fit your system 4# Customize below to fit your system
5 5
diff --git a/main.c b/main.c
index 964fad6..3ea9d89 100644
--- a/main.c
+++ b/main.c
@@ -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)