Plan 9 from Bell Labs’s /usr/web/sources/contrib/mospak/abaco-html4/abaco-pageselect-ordering.diff

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--- sys/src/cmd/abaco/NOTES
+++ sys/src/cmd/abaco/NOTES
@@ -1,6 +1,5 @@
 Bugs:
-	* fix text selection and double clicking;

 Not Bugs:
 	* complaints like "gif: decode <stdin> failed: ReadGIF: can't recognize format ��"
 	  are caused by sites that return a jpeg and send Content-Type: image/gif.
--- sys/src/cmd/abaco/page.c
+++ sys/src/cmd/abaco/page.c
@@ -538,7 +538,14 @@

 		scrled = pagescrollxy(p, x, y);
 		npos = getpt(p, mp);
-		if(opos.y <  npos.y){
+		if(linewhich(p->lay, opos) == linewhich(p->lay, npos)){
+			/* same visual line -- order by X (pixel-Y is
+			 * unstable against 1-2 px mouse-hardware wobble) */
+			if(opos.x <= npos.x)
+				p->top = opos, p->bot = npos;
+			else
+				p->top = npos, p->bot = opos;
+		}else if(opos.y < npos.y){
 			p->top = opos;
 			p->bot = npos;
 		}else{

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.