mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-17 06:17:12 +09:00
Slight additional improvement to word movement
This commit is contained in:
@@ -185,9 +185,9 @@ func (c *Cursor) WordRight() {
|
||||
|
||||
// WordLeft moves the cursor one word to the left
|
||||
func (c *Cursor) WordLeft() {
|
||||
c.Left()
|
||||
for IsWhitespace(c.RuneUnder(c.X)) {
|
||||
if c.X == 0 {
|
||||
c.Left()
|
||||
return
|
||||
}
|
||||
c.Left()
|
||||
@@ -199,6 +199,7 @@ func (c *Cursor) WordLeft() {
|
||||
}
|
||||
c.Left()
|
||||
}
|
||||
c.Right()
|
||||
}
|
||||
|
||||
// RuneUnder returns the rune under the given x position
|
||||
|
||||
Reference in New Issue
Block a user