mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-21 00:10:29 +00:00
Fix small bug with word selection
This commit is contained in:
parent
43bf1e2d4e
commit
77164fd08c
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue