Accept autosuggestion
(event: KeyPressEvent)
| 475 | |
| 476 | |
| 477 | def accept(event: KeyPressEvent): |
| 478 | """Accept autosuggestion""" |
| 479 | buffer = event.current_buffer |
| 480 | suggestion = buffer.suggestion |
| 481 | if suggestion: |
| 482 | buffer.insert_text(suggestion.text) |
| 483 | else: |
| 484 | nc.forward_char(event) |
| 485 | |
| 486 | |
| 487 | def discard(event: KeyPressEvent): |
no outgoing calls
searching dependent graphs…