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
800
800
(jupyter-repl-insert-prompt 'in ))))
801
801
(goto-char (point-max )))
802
802
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
+
803
811
; ;; Handlers
804
812
805
813
(defun jupyter-repl-history-add (code )
@@ -1649,6 +1657,7 @@ Return the buffer switched to."
1649
1657
(define-key map (kbd " M-n" ) #'jupyter-repl-history-next )
1650
1658
(define-key map (kbd " M-p" ) #'jupyter-repl-history-previous )
1651
1659
(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 )
1652
1661
(define-key map (kbd " C-c M-r" ) #'jupyter-repl-history-previous-matching )
1653
1662
(define-key map (kbd " C-c M-s" ) #'jupyter-repl-history-next-matching )
1654
1663
map))
You can’t perform that action at this time.
0 commit comments