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

Function delete_word_to_cursor

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

Source from the content-addressed store, hash-verified

280@edit_keys.on(config="clear_word_key")
281@kills_behind
282def delete_word_to_cursor(cursor_offset, line):
283 start = 0
284 for match in delete_word_to_cursor_re.finditer(line[:cursor_offset]):
285 start = match.start() + 1
286 return (
287 start,
288 line[:start] + line[cursor_offset:],
289 line[start:cursor_offset],
290 )
291
292
293@edit_keys.on("<Esc+y>")

Callers

nothing calls this directly

Calls 2

finditerMethod · 0.80
startMethod · 0.80

Tested by

no test coverage detected