Skip to content

Commit d9dfa62

Browse files
authored
Merge pull request #530 from tarsiiformes/indentation
Fix indentation and enforce use of spaces
2 parents 2b1392c + 87b2486 commit d9dfa62

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

vterm.el

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ the executable."
133133
;; If the vterm-module is not compiled yet, compile it
134134
(unless (require 'vterm-module nil t)
135135
(if (or vterm-always-compile-module
136-
(y-or-n-p "Vterm needs `vterm-module' to work. Compile it now? "))
136+
(y-or-n-p "Vterm needs `vterm-module' to work. Compile it now? "))
137137
(progn
138138
(vterm-module-compile)
139139
(require 'vterm-module))
@@ -237,7 +237,7 @@ function `vterm--exclude-keys' removes the keybindings defined in
237237
:set (lambda (sym val)
238238
(set sym val)
239239
(when (and (fboundp 'vterm--exclude-keys)
240-
(boundp 'vterm-mode-map))
240+
(boundp 'vterm-mode-map))
241241
(vterm--exclude-keys vterm-mode-map val)))
242242
:group 'vterm)
243243

@@ -691,7 +691,7 @@ Exceptions are defined by `vterm-keymap-exceptions'."
691691
:command
692692
`("/bin/sh" "-c"
693693
,(format
694-
"stty -nl sane %s erase ^? rows %d columns %d >/dev/null && exec %s"
694+
"stty -nl sane %s erase ^? rows %d columns %d >/dev/null && exec %s"
695695
;; Some stty implementations (i.e. that of *BSD) do not
696696
;; support the iutf8 option. to handle that, we run some
697697
;; heuristics to work out if the system supports that
@@ -717,7 +717,7 @@ Exceptions are defined by `vterm-keymap-exceptions'."
717717
;; mode can break this, leading to segmentation faults.
718718
(add-hook 'change-major-mode-hook
719719
(lambda () (interactive)
720-
(user-error "You cannot change major mode in vterm buffers")) nil t)
720+
(user-error "You cannot change major mode in vterm buffers")) nil t)
721721

722722
(vterm--set-pty-name vterm--term (process-tty-name vterm--process))
723723
(process-put vterm--process 'adjust-window-size-function
@@ -835,7 +835,7 @@ will invert `vterm-copy-exclude-prompt' for that call."
835835
(setq key (upcase key)))
836836
(vterm--update vterm--term key shift meta ctrl)
837837
(setq vterm--redraw-immididately t)
838-
(accept-process-output vterm--process vterm-timer-delay nil t))))
838+
(accept-process-output vterm--process vterm-timer-delay nil t))))
839839

840840
(defun vterm-send (key)
841841
"Send KEY to libvterm. KEY can be anything `kbd' understands."
@@ -1122,10 +1122,10 @@ Search Manipulate Selection Data in
11221122
(unless (or (string-equal data "?")
11231123
(string-empty-p data))
11241124
(let* ((inhibit-eol-conversion t)
1125-
(decoded-data (decode-coding-string
1126-
(base64-decode-string data) locale-coding-system))
1127-
(select-enable-clipboard select-enable-clipboard)
1128-
(select-enable-primary select-enable-primary))
1125+
(decoded-data (decode-coding-string
1126+
(base64-decode-string data) locale-coding-system))
1127+
(select-enable-clipboard select-enable-clipboard)
1128+
(select-enable-primary select-enable-primary))
11291129
;; https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
11301130
;; c , p , q , s , 0 , 1 , 2 , 3 , 4 , 5 , 6 , and 7
11311131
;; clipboard, primary, secondary, select, or cut buffers 0 through 7
@@ -1330,19 +1330,19 @@ Argument EVENT process event."
13301330
;; enabled, otherwise the buffer would be redrawn, messing around with the
13311331
;; position of the point.
13321332
(unless vterm-copy-mode
1333-
(let* ((size (funcall window-adjust-process-window-size-function
1334-
process windows))
1335-
(width (car size))
1336-
(height (cdr size))
1337-
(inhibit-read-only t))
1338-
(setq width (- width (vterm--get-margin-width)))
1339-
(setq width (max width vterm-min-window-width))
1340-
(when (and (processp process)
1341-
(process-live-p process)
1342-
(> width 0)
1343-
(> height 0))
1344-
(vterm--set-size vterm--term height width)
1345-
(cons width height)))))
1333+
(let* ((size (funcall window-adjust-process-window-size-function
1334+
process windows))
1335+
(width (car size))
1336+
(height (cdr size))
1337+
(inhibit-read-only t))
1338+
(setq width (- width (vterm--get-margin-width)))
1339+
(setq width (max width vterm-min-window-width))
1340+
(when (and (processp process)
1341+
(process-live-p process)
1342+
(> width 0)
1343+
(> height 0))
1344+
(vterm--set-size vterm--term height width)
1345+
(cons width height)))))
13461346

13471347
(defun vterm--get-margin-width ()
13481348
"Get margin width of vterm buffer when `display-line-numbers-mode' is enabled."
@@ -1607,4 +1607,7 @@ can find them and remove them."
16071607

16081608

16091609
(provide 'vterm)
1610+
;; Local Variables:
1611+
;; indent-tabs-mode: nil
1612+
;; End:
16101613
;;; vterm.el ends here

0 commit comments

Comments
 (0)