From cfb2cc057c32330be0ca0a68cfbd245cb2b8e31b Mon Sep 17 00:00:00 2001
From: Tulir Asokan <tulir@maunium.net>
Date: Wed, 5 Sep 2018 10:55:48 +0300
Subject: Update to latest gomatrix. Things are broken

---
 vendor/github.com/mattn/go-runewidth/runewidth.go | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'vendor/github.com/mattn')

diff --git a/vendor/github.com/mattn/go-runewidth/runewidth.go b/vendor/github.com/mattn/go-runewidth/runewidth.go
index 2164497..82568a1 100644
--- a/vendor/github.com/mattn/go-runewidth/runewidth.go
+++ b/vendor/github.com/mattn/go-runewidth/runewidth.go
@@ -1,13 +1,24 @@
 package runewidth
 
+import "os"
+
 var (
 	// EastAsianWidth will be set true if the current locale is CJK
-	EastAsianWidth = IsEastAsian()
+	EastAsianWidth bool
 
 	// DefaultCondition is a condition in current locale
 	DefaultCondition = &Condition{EastAsianWidth}
 )
 
+func init() {
+	env := os.Getenv("RUNEWIDTH_EASTASIAN")
+	if env == "" {
+		EastAsianWidth = IsEastAsian()
+	} else {
+		EastAsianWidth = env == "1"
+	}
+}
+
 type interval struct {
 	first rune
 	last  rune
@@ -55,6 +66,7 @@ var private = table{
 var nonprint = table{
 	{0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD},
 	{0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F},
+	{0x2028, 0x2029},
 	{0x202A, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF},
 	{0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF},
 }
-- 
cgit v1.2.3-70-g09d2