From fa934fa485aa746c87700b835f5094fbf318d75e Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 16 Feb 2023 14:09:23 -0500 Subject: [PATCH] Keyboard text selection is now no longer broken lmao --- textmanip/textmanip.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/textmanip/textmanip.go b/textmanip/textmanip.go index 6d5304a..e86d6b7 100644 --- a/textmanip/textmanip.go +++ b/textmanip/textmanip.go @@ -171,9 +171,9 @@ func SelectLeft (text []rune, dot Dot, word bool) (moved Dot) { dot = dot.Constrain(len(text)) distance := 1 if word { - distance = WordToLeft(text, dot.Start) + distance = WordToLeft(text, dot.End) } - dot.Start -= distance + dot.End -= distance return dot } @@ -183,6 +183,6 @@ func SelectRight (text []rune, dot Dot, word bool) (moved Dot) { if word { distance = WordToRight(text, dot.End) } - dot.Start += distance + dot.End += distance return dot }