From 77164fd08cded221d2b294d5c7e01ae5e4d6b3b2 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Mon, 28 Mar 2016 19:31:32 -0400 Subject: [PATCH] Fix small bug with word selection --- src/cursor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cursor.go b/src/cursor.go index 722fa158..70b7442e 100644 --- a/src/cursor.go +++ b/src/cursor.go @@ -127,6 +127,10 @@ func (c *Cursor) AddLineToSelection() { // SelectWord selects the word the cursor is currently on func (c *Cursor) SelectWord() { if !IsWordChar(string(c.RuneUnder(c.x))) { + loc := c.Loc() + c.curSelection[0] = loc + c.curSelection[1] = loc + c.origSelection = c.curSelection return }