Skip to content

Commit

Permalink
adjust terminal size
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxr committed Jul 16, 2024
1 parent f1fa55a commit 4fe89c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions extensions/terminal/terminal-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@
:cols (window-width window)))

(define-command terminal-resize () ()
(let ((terminal (get-current-terminal))
(window (current-window)))
(alexandria:when-let ((terminal (get-current-terminal))
(window (current-window)))
(resize-terminal terminal window)))

(defun on-window-size-change (window)
Expand All @@ -189,3 +189,6 @@

(add-hook *window-size-change-functions*
'on-window-size-change)

(add-hook *post-command-hook*
'terminal-resize)

0 comments on commit 4fe89c0

Please sign in to comment.