shithub: mc

Download patch

ref: 5e93d7d5973263c91da1dd085c0564b4516f11d3
parent: feb438e1da5e94850119f4593d64a821f21a4242
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Oct 26 18:22:05 EDT 2016

Use positive value for invalid char width.

	This allows resyncing the character stream painlessly,
	and doesn't attempt to back up in the case of invalid
	input, when used in the obvious way.

--- a/lib/std/utf.myr
+++ b/lib/std/utf.myr
@@ -24,7 +24,7 @@
 	elif c < 0x200000
 		-> 4
 	else
-		-> -1
+		-> 1 /* attempt to resync */
 	;;
 }