mirror of
https://github.com/0intro/wmii
synced 2024-11-27 00:00:36 +03:00
Fix selection of areas by index.
This commit is contained in:
parent
ca3bcebf82
commit
56e1ee9a13
10
area.c
10
area.c
@ -412,11 +412,13 @@ select_area(Area *a, char *arg) {
|
||||
p = f->anext ? f->anext : a->frame;
|
||||
goto focus_frame;
|
||||
}
|
||||
else {
|
||||
if(sscanf(arg, "%d", &i) != 1)
|
||||
else if(!strncmp(arg, "~", 2)) {
|
||||
new = v->area;
|
||||
}else {
|
||||
if(sscanf(arg, "%u", &i) != 1 || i == 0)
|
||||
return Ebadvalue;
|
||||
for(new=view->area; new->next; new=new->next)
|
||||
if(!--i) break;;
|
||||
for(new=view->area->next; new->next && i; new=new->next)
|
||||
if(!--i) break;
|
||||
}
|
||||
focus_area(new);
|
||||
return nil;
|
||||
|
Loading…
Reference in New Issue
Block a user