(cursor_offset, line)
| 280 | @edit_keys.on(config="clear_word_key") |
| 281 | @kills_behind |
| 282 | def 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>") |