aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--vterm.el10
2 files changed, 14 insertions, 3 deletions
diff --git a/README.md b/README.md
index eb332b4..f77cf03 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,11 @@ git clone https://github.com/akermu/emacs-libvterm.git
Before installing emacs-libvterm, you need to make sure you have
installed
- 1. cmake (>=3.11)
- 2. libtool-bin (related issues: [#66](https://github.com/akermu/emacs-libvterm/issues/66) [#85](https://github.com/akermu/emacs-libvterm/issues/85#issuecomment-491845136))
+ 1. Emacs with [module
+ support](https://www.gnu.org/software/emacs/manual/html_node/elisp/Dynamic-Modules.html).
+ You can check that, by verifying that `module-file-suffix` is not `nil`.
+ 2. cmake (>=3.11)
+ 3. libtool-bin (related issues: [#66](https://github.com/akermu/emacs-libvterm/issues/66) [#85](https://github.com/akermu/emacs-libvterm/issues/85#issuecomment-491845136))
Run the build:
diff --git a/vterm.el b/vterm.el
index eb30382..a8aae57 100644
--- a/vterm.el
+++ b/vterm.el
@@ -42,6 +42,9 @@
;;; Code:
+(unless module-file-suffix
+ (error "VTerm needs module support. Please compile your Emacs with the --with-modules option!"))
+
(require 'term)
(defvar vterm-install-buffer-name " *Install vterm"
@@ -290,6 +293,8 @@ If nil, never delay")
"Minor mode map for `vterm-copy-mode'.")
(define-key vterm-copy-mode-map (kbd "C-c C-t") #'vterm-copy-mode)
+(defvar-local vterm--copy-saved-point nil)
+
(define-minor-mode vterm-copy-mode
"Toggle vterm copy mode."
:group 'vterm
@@ -298,7 +303,10 @@ If nil, never delay")
(if vterm-copy-mode
(progn ;enable vterm-copy-mode
(use-local-map nil)
- (vterm-send-stop))
+ (vterm-send-stop)
+ (setq vterm--copy-saved-point (point)))
+ (if vterm--copy-saved-point
+ (goto-char vterm--copy-saved-point))
(use-local-map vterm-mode-map)
(vterm-send-start)))