Keyboard text selection is now no longer broken lmao

This commit is contained in:
Sasha Koshka 2023-02-16 14:09:23 -05:00
parent 56dc9ba54c
commit fa934fa485
1 changed files with 3 additions and 3 deletions

View File

@ -171,9 +171,9 @@ func SelectLeft (text []rune, dot Dot, word bool) (moved Dot) {
dot = dot.Constrain(len(text)) dot = dot.Constrain(len(text))
distance := 1 distance := 1
if word { if word {
distance = WordToLeft(text, dot.Start) distance = WordToLeft(text, dot.End)
} }
dot.Start -= distance dot.End -= distance
return dot return dot
} }
@ -183,6 +183,6 @@ func SelectRight (text []rune, dot Dot, word bool) (moved Dot) {
if word { if word {
distance = WordToRight(text, dot.End) distance = WordToRight(text, dot.End)
} }
dot.Start += distance dot.End += distance
return dot return dot
} }