Skip to content

Commit 3e5a9b7

Browse files
DamienCassoujixiuf
authored andcommitted
Fix vterm--remove-fake-newlines when in an empty buffer
When the buffer is empty, (get-text-property (1- (point)) 'vterm-line-wrap) throws an error. This situation happens when the empty string is passed as argument to `vterm--filter-buffer-substring`.
1 parent 990cc18 commit 3e5a9b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vterm.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,6 +1789,7 @@ If REMEMBERING-POS-P is not nil remembering their positions in a buffer-local
17891789

17901790
(goto-char (point-max))
17911791
(when (and (bolp)
1792+
(not (bobp))
17921793
(get-text-property (1- (point)) 'vterm-line-wrap))
17931794
(forward-char -1)
17941795
(when remembering-pos-p

0 commit comments

Comments
 (0)