mothra: fix alt display crash, repair mistake

front
cinap_lenrek 2012-03-23 04:44:52 +01:00
parent 1b734021eb
commit 2d5aecc845
1 changed files with 14 additions and 11 deletions

View File

@ -627,6 +627,14 @@ void docmd(Panel *p, char *s){
case 'g': case 'g':
s = arg(s); s = arg(s);
if(*s=='\0'){ if(*s=='\0'){
case 'r':
if(selection)
s = urlstr(selection);
else
message("no url selected");
}
geturl(s, GET, 0, 0, 0);
break;
case 'j': case 'j':
s = arg(s); s = arg(s);
if(*s) if(*s)
@ -637,14 +645,6 @@ void docmd(Panel *p, char *s){
case 'm': case 'm':
mothon(current, !mothmode); mothon(current, !mothmode);
break; break;
case 'r':
if(selection)
s = urlstr(selection);
else
message("no url selected");
}
geturl(s, GET, 0, 0, 0);
break;
case 'w': case 'w':
case 'W': case 'W':
s = arg(s); s = arg(s);
@ -1130,14 +1130,17 @@ void hit3(int button, int item){
swap=root; swap=root;
root=alt; root=alt;
alt=swap; alt=swap;
if(current)
current->yoffs=plgetpostextview(text); current->yoffs=plgetpostextview(text);
swap=text; swap=text;
text=alttext; text=alttext;
alttext=swap; alttext=swap;
defdisplay=!defdisplay; defdisplay=!defdisplay;
plpack(root, screen->r); plpack(root, screen->r);
if(current){
plinittextview(text, PACKE|EXPAND, Pt(0, 0), current->text, dolink); plinittextview(text, PACKE|EXPAND, Pt(0, 0), current->text, dolink);
plsetpostextview(text, current->yoffs); plsetpostextview(text, current->yoffs);
}
pldraw(root, screen); pldraw(root, screen);
break; break;
case 1: case 1: