diff options
| author | Peter Breton <peter@pazien.com> | 2024-08-21 17:43:46 -0400 |
|---|---|---|
| committer | Gabriele Bozzola <sbozzolator@gmail.com> | 2024-08-24 18:33:36 -0700 |
| commit | 988279316fc89e6d78947b48513f248597ba969a (patch) | |
| tree | f758e2107525681c317488b9b1b674800294c80a | |
| parent | d9ea29fb10aed20512bd95dc5b8c1a01684044b1 (diff) | |
Support modes derived from vterm
- When checking for vterm-mode, also support modes derived from vterm
| -rw-r--r-- | vterm.el | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -872,7 +872,8 @@ it to the bookmarked directory if needed." `'compilation-shell-minor-mode' would change the value of local variable `next-error-function', so we should call this function in `compilation-shell-minor-mode-hook'." - (when (eq major-mode 'vterm-mode) + (when (or (eq major-mode 'vterm-mode) + (derived-mode-p 'vterm-mode)) (setq next-error-function 'vterm-next-error-function))) (add-hook 'compilation-shell-minor-mode-hook #'vterm--compilation-setup) @@ -928,7 +929,8 @@ A conventient way to exit `vterm-copy-mode' is with :group 'vterm :lighter " VTermCopy" :keymap vterm-copy-mode-map - (if (equal major-mode 'vterm-mode) + (if (or (equal major-mode 'vterm-mode) + (derived-mode-p 'vterm-mode)) (if vterm-copy-mode (vterm--enter-copy-mode) (vterm--exit-copy-mode)) @@ -1549,7 +1551,8 @@ Argument EVENT process event." (defun vterm--text-scale-mode (&optional _argv) "Fix `line-number' height for scaled text." (and text-scale-mode - (equal major-mode 'vterm-mode) + (or (equal major-mode 'vterm-mode) + (derived-mode-p 'vterm-mode)) (boundp 'display-line-numbers) (let ((height (expt text-scale-mode-step text-scale-mode-amount))) |
