MCPcopy Create free account
hub / github.com/bpython/bpython / forward_word

Function forward_word

bpython/curtsiesfrontend/manual_readline.py:203–206  ·  view source on GitHub ↗
(cursor_offset, line)

Source from the content-addressed store, hash-verified

201@edit_keys.on("<Ctrl-RIGHT>")
202@edit_keys.on("<Esc+RIGHT>")
203def forward_word(cursor_offset, line):
204 match = forward_word_re.search(line[cursor_offset:] + " ")
205 delta = match.end() - 1 if match else 0
206 return (cursor_offset + delta, line)
207
208
209def last_word_pos(string):

Callers 4

test_forward_wordMethod · 0.90
test_forward_word_endMethod · 0.90

Calls 1

searchMethod · 0.80

Tested by 4

test_forward_wordMethod · 0.72
test_forward_word_endMethod · 0.72