shithub: lola

Download patch

ref: 5d3ac7411f3e3193b721822d94683a647b90aeb3
parent: 502b51ff4082dcdf557bafafc2450637a5a6109b
author: aap <[email protected]>
date: Wed Feb 28 09:16:37 EST 2024

small changes to cut/paste/snarf

--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
 rethink resizing and repainting
 rethink hiding/unhiding
-snarfversion
 check for bad rects (what's left here?)
 top/bottom/current seems to work a bit different in rio
 release keys and buttons when unfocused
--- a/fs.c
+++ b/fs.c
@@ -306,6 +306,8 @@
 	d->gid = estrdup9p(d->uid);
 	d->muid = estrdup9p(d->uid);
 	d->qid = (Qid){QID(ID(w),dirents[i].path), 0, dirents[i].type};
+	if(dirents[i].path == Qsnarf)
+		d->qid.vers = snarfversion;
 	d->mode = dirents[i].mode;
 	d->name = estrdup9p(dirents[i].name);
 	d->length = 0;
--- a/main.c
+++ b/main.c
@@ -472,7 +472,6 @@
 	case Cut:
 		xsnarf(x);
 		xcut(x);
-		xscrdraw(x);			// TODO let cut handle this?
 		break;
 	case Paste:
 		xpaste(x);
@@ -479,7 +478,6 @@
 		break;
 	case Snarf:
 		xsnarf(x);
-		xscrdraw(x);			// TODO let snarf handle this?
 		break;
 	case Plumb:
 		if(xplumb(x, "lola", w->dir, fsys.msize-1024)){
--- a/text.c
+++ b/text.c
@@ -737,7 +737,6 @@
 			}else{
 				xpaste(x);
 			}
-			xscrdraw(x);			// TODO let cut/paste handle this?
 		}
 		while(mc->buttons == b)
 			readmouse(mc);
@@ -879,6 +878,7 @@
 		return;
 	xdelete(x, x->q0, x->q1);
 	xsetselect(x, x->q0, x->q0);
+	xscrdraw(x);
 }
 
 void
@@ -898,6 +898,7 @@
 		q0 = xinsert(x, snarf, nsnarf, x->q0);
 		xsetselect(x, q0, q0+nsnarf);
 	}
+	xscrdraw(x);
 }
 
 void