shithub: riscv

Download patch

ref: f990a6d30abe4a50d3120f513f8a6b3f6c531b2a
parent: 303394314aa041cf52cbb02441aca04f12aafddf
author: cinap_lenrek <[email protected]>
date: Mon May 13 00:40:02 EDT 2013

rio: place text at beginning of line before cursor and host point

--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -493,8 +493,8 @@
 	rp = runefmtstrflush(&f);
 	nr = runestrlen(rp);
 
-	/* place text at beginning of line before cursor */
-	qline = w->q0;
+	/* place text at beginning of line before cursor and host point */
+	qline = min(w->qh, w->q0);
 	while(qline>0 && w->r[qline-1] != '\n')
 		qline--;