()
| 168 | ) |
| 169 | |
| 170 | function handleCtrlD(): MaybeCursor { |
| 171 | if (cursor.text === '') { |
| 172 | // When input is empty, handle double-press |
| 173 | handleEmptyCtrlD() |
| 174 | return cursor |
| 175 | } |
| 176 | // When input is not empty, delete forward like iPython |
| 177 | return cursor.del() |
| 178 | } |
| 179 | |
| 180 | function killToLineEnd(): Cursor { |
| 181 | const { cursor: newCursor, killed } = cursor.deleteToLineEnd() |