// returns true if the move was successful, false if BOF reached.
returns true if the move was successful, false if BOF reached.
// returns true if the move was successful false if BOF reached .
func (c *cursor_location) move_one_word_backward() bool {
	for {
		if c.bol() {
			if c.first_line() {
				return false
			} else {
				c.line = c.line.prev
				c.line_num--
				c.boffset = len(c.line.data)
				continue
			}
		}
		r, rlen := c.rune_before()
		for !is_word(r) && !c.bol() {
			c.boffset -= rlen
			r, rlen = c.rune_before()
		}
		if c.bol() {
			continue
		}
		break
	}
	r, rlen := c.rune_before()
	for is_word(r) && !c.bol() {
		c.boffset -= rlen
		r, rlen = c.rune_before()
	}
	return true
}
func ( c * cursor_location ) move_one_word_backward ( ) bool { for { if c . bol ( ) { if c . first_line ( ) { return false } else { c . line = c . line . prev c . line_num -- c . boffset = len ( c . line . data ) continue } } r , rlen := c . rune_before ( ) for ! is_word ( r ) && ! c . bol ( ) { c . boffset -= rlen r , rlen = c . rune_before ( ) } if c . bol ( ) { continue } break } r , rlen := c . rune_before ( ) for is_word ( r ) && ! c . bol ( ) { c . boffset -= rlen r , rlen = c . rune_before ( ) } return true }
returns true if the move was successful, false if BOF reached.
returns true if the move was successful false if BOF reached .
// move cursor backward while previous rune is not a word rune // now the rune behind the cursor is a word rune, while it's true, move // backwards