shithub: orca

Download patch

ref: 371384bf01cded8f8db4c8056557c0efdafd3c33
parent: 2bdc2925149b0e1eb200365f709ef8111b1c3c37
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Feb 15 17:34:35 EST 2020

plan9: change keys for far movement to C-a/e on x, Home/End on y

--- a/plan9.c
+++ b/plan9.c
@@ -843,17 +843,27 @@
 					curx = MIN(w-1, curx+movex);
 				}
 				break;
-			case Khome:
+			case Ksoh: /* C-a */
+				if (shiftdown || mode == Mselect)
+					selw = curx;
 				curx = 0;
 				break;
-			case Kend:
-				curx = field.width-1;
+			case Kenq: /* C-e */
+				if (shiftdown || mode == Mselect)
+					selw = field.width - curx;
+				else
+					curx = field.width-1;
 				break;
-			case Kpgup:
+			case Khome:
+				if (shiftdown || mode == Mselect)
+					selh = cury;
 				cury = 0;
 				break;
-			case Kpgdown:
-				cury = field.height-1;
+			case Kend:
+				if (shiftdown || mode == Mselect)
+					selh = field.height - cury;
+				else
+					cury = field.height-1;
 				break;
 			case 0x12: /* C-r */
 				tick = -1;