mirror of
https://github.com/vale981/py-vterm-interaction.el
synced 2025-03-04 09:31:40 -05:00
fix send-buffer for standard python
This commit is contained in:
parent
862eb0dcd3
commit
4558d98099
1 changed files with 6 additions and 3 deletions
|
@ -533,15 +533,18 @@ If the function has no arguments, the function call is run immediately."
|
|||
(defun python-vterm-send-buffer ()
|
||||
"Send the whole content of the script buffer to the Python REPL line by line."
|
||||
(interactive)
|
||||
(save-excursion
|
||||
(python-vterm-paste-string (python-vterm-ensure-newline (buffer-string)))))
|
||||
(let ((python-vterm-paste-with-return t)
|
||||
(python-vterm-paste-with-clear nil))
|
||||
|
||||
(python-vterm-paste-string (buffer-string))))
|
||||
|
||||
(defun python-vterm-send-run-buffer-file ()
|
||||
"Run the current buffer file in the python vterm buffer.
|
||||
|
||||
This is equivalent to running `%run -i <buffer-file-name>` in the python vterm buffer."
|
||||
(interactive)
|
||||
(let ((file buffer-file-name))
|
||||
(let ((file buffer-file-name)
|
||||
(python-vterm-paste-with-return t))
|
||||
(with-current-buffer (python-vterm-fellow-repl-buffer)
|
||||
(python-vterm-paste-string (python-vterm--load-file file "load script buffer")))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue