Skip to content

Commit

Permalink
[Fix #1835] Allow visiting existing vterm buffer in other window (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Taan authored Sep 19, 2023
1 parent 01bd080 commit 4247ac7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
* [#1831](https://github.com/bbatsov/projectile/issues/1831): Enable the project.el integration only when `projectile-mode` is active.
* [#1847](https://github.com/bbatsov/projectile/issues/1847): Use literal directory name casing when toggling between impl and test.

### Bug fixed
### Bugs fixed

* Fix `fd` inserting color control sequences when used over tramp.
* [#1835](https://github.com/bbatsov/projectile/issues/1835): Reopening existing vterm buffer in other window

## 2.7.0 (2022-11-22)

Expand Down
12 changes: 7 additions & 5 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -4549,14 +4549,16 @@ be displayed in a different window.
Switch to the project specific term buffer if it already exists."
(let* ((project (projectile-acquire-root))
(buffer (projectile-generate-process-name "vterm" new-process project)))
(unless (buffer-live-p (get-buffer buffer))
(unless (require 'vterm nil 'noerror)
(error "Package 'vterm' is not available"))
(unless (require 'vterm nil 'noerror)
(error "Package 'vterm' is not available"))
(if (buffer-live-p (get-buffer buffer))
(if other-window
(switch-to-buffer-other-window buffer)
(switch-to-buffer buffer))
(projectile-with-default-dir project
(if other-window
(vterm-other-window buffer)
(vterm buffer))))
(switch-to-buffer buffer)))
(vterm buffer))))))

;;;###autoload
(defun projectile-run-vterm (&optional arg)
Expand Down

0 comments on commit 4247ac7

Please sign in to comment.