acme: fix border size, autoindent undo: imported from plan9port (thanks jxy)
origin: https://github.com/9fans/plan9port/pull/493 https://github.com/9fans/plan9port/pull/489 https://github.com/9fans/plan9port/pull/461
This commit is contained in:
parent
a90a801685
commit
0256a34560
3 changed files with 8 additions and 7 deletions
|
@ -208,8 +208,8 @@ colresize(Column *c, Rectangle r)
|
||||||
r1.max.y = r.max.y;
|
r1.max.y = r.max.y;
|
||||||
else {
|
else {
|
||||||
r1.max.y = r1.min.y;
|
r1.max.y = r1.min.y;
|
||||||
if(new > 0 && old > 0 && Dy(w->r) > Border+font->height)
|
if(new > 0 && old > 0 && Dy(w->r) > font->height)
|
||||||
r1.max.y += (Dy(w->r)-Border-font->height)*new/old + Border + font->height;
|
r1.max.y += (Dy(w->r)-font->height)*new/old + Border + font->height;
|
||||||
}
|
}
|
||||||
r2 = r1;
|
r2 = r1;
|
||||||
r2.max.y = r2.min.y+Border;
|
r2.max.y = r2.min.y+Border;
|
||||||
|
@ -422,7 +422,7 @@ colgrow(Column *c, Window *w, int but)
|
||||||
}
|
}
|
||||||
if(j < c->nw-1){ /* no border on last window */
|
if(j < c->nw-1){ /* no border on last window */
|
||||||
r.min.y = v->r.max.y;
|
r.min.y = v->r.max.y;
|
||||||
r.max.y += Border;
|
r.max.y = r.min.y + Border;
|
||||||
draw(screen, r, display->black, nil, ZP);
|
draw(screen, r, display->black, nil, ZP);
|
||||||
}
|
}
|
||||||
y1 = r.max.y;
|
y1 = r.max.y;
|
||||||
|
|
|
@ -314,7 +314,7 @@ isfilec(Rune r)
|
||||||
{
|
{
|
||||||
if(isalnum(r))
|
if(isalnum(r))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
if(runestrchr(L".-+/:", r))
|
if(runestrchr(L".-+/:@", r))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -664,6 +664,7 @@ texttype(Text *t, Rune r)
|
||||||
uint q0, q1;
|
uint q0, q1;
|
||||||
int nnb, nb, n, i;
|
int nnb, nb, n, i;
|
||||||
int nr;
|
int nr;
|
||||||
|
Rune rr;
|
||||||
Rune *rp;
|
Rune *rp;
|
||||||
Text *u;
|
Text *u;
|
||||||
|
|
||||||
|
@ -818,10 +819,10 @@ texttype(Text *t, Rune r)
|
||||||
nr = 0;
|
nr = 0;
|
||||||
rp[nr++] = r;
|
rp[nr++] = r;
|
||||||
for(i=0; i<nnb; i++){
|
for(i=0; i<nnb; i++){
|
||||||
r = textreadc(t, t->q0-nnb+i);
|
rr = textreadc(t, t->q0-nnb+i);
|
||||||
if(r != ' ' && r != '\t')
|
if(rr != ' ' && rr != '\t')
|
||||||
break;
|
break;
|
||||||
rp[nr++] = r;
|
rp[nr++] = rr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break; /* fall through to normal code */
|
break; /* fall through to normal code */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue