File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -800,6 +800,14 @@ lines, truncate it to something less than
800800 (jupyter-repl-insert-prompt 'in ))))
801801 (goto-char (point-max )))
802802
803+ (defun jupyter-repl-clear-input ()
804+ " Clear the contents of the input cell."
805+ (interactive )
806+ (goto-char (point-max ))
807+ (delete-region
808+ (jupyter-repl-cell-code-beginning-position)
809+ (point-max )))
810+
803811; ;; Handlers
804812
805813(defun jupyter-repl-history-add (code )
@@ -1649,6 +1657,7 @@ Return the buffer switched to."
16491657 (define-key map (kbd " M-n" ) #'jupyter-repl-history-next )
16501658 (define-key map (kbd " M-p" ) #'jupyter-repl-history-previous )
16511659 (define-key map (kbd " C-c C-o" ) #'jupyter-repl-clear-cells )
1660+ (define-key map (kbd " C-c C-u" ) #'jupyter-repl-clear-input )
16521661 (define-key map (kbd " C-c M-r" ) #'jupyter-repl-history-previous-matching )
16531662 (define-key map (kbd " C-c M-s" ) #'jupyter-repl-history-next-matching )
16541663 map))
You can’t perform that action at this time.
0 commit comments