commit - ef99c9f1ae9a620d997493558d5029d1d89f4a30
commit + c3feb5c5c1ef2ddc014f77221a7ad10f140f7bfa
blob - ce9bfa0a80aa5d57270b11b5a4dbe28000264cba
blob + 389677f648d95759f4bfc6b7119dcd501d59204f
--- src/libframe/frinsert.c
+++ src/libframe/frinsert.c
Frbox *b;
int n, n0, nn0, y;
ulong cn0;
- Image *col;
+ Image *col, *tcol;
Rectangle r;
static struct{
Point pt0, pt1;
if(r.max.x >= f->r.max.x)
r.max.x = f->r.max.x;
cn0--;
- if(f->p0<=cn0 && cn0<f->p1) /* b is inside selection */
+ if(f->p0<=cn0 && cn0<f->p1){ /* b is inside selection */
col = f->cols[HIGH];
- else
+ tcol = f->cols[HTEXT];
+ }else{
col = f->cols[BACK];
+ tcol = f->cols[TEXT];
+ }
draw(f->b, r, col, nil, r.min);
y = 0;
if(pt.x == f->r.min.x)
}
}
/* insertion can extend the selection, so the condition here is different */
- if(f->p0<p0 && p0<=f->p1)
+ if(f->p0<p0 && p0<=f->p1){
col = f->cols[HIGH];
- else
+ tcol = f->cols[HTEXT];
+ }else{
col = f->cols[BACK];
+ tcol = f->cols[TEXT];
+ }
frselectpaint(f, ppt0, ppt1, col);
- _frdrawtext(&frame, ppt0, f->cols[TEXT], col);
+ _frdrawtext(&frame, ppt0, tcol, col);
_fraddbox(f, nn0, frame.nbox);
for(n=0; n<frame.nbox; n++)
f->box[nn0+n] = frame.box[n];