aboutsummaryrefslogtreecommitdiff
path: root/vterm.el
diff options
context:
space:
mode:
authorDamien Cassou <damien@cassou.me>2023-02-15 21:39:11 +0100
committerjixiuf <jixiuf@qq.com>2023-02-17 10:28:45 +0800
commit3e5a9b754b8e61850bb7d1b63b090b9fbf6687f3 (patch)
tree92310f3b4c07b93988fbaeeac7d6befd24100f92 /vterm.el
parent990cc18decb489c54d16d03fd8acbfe268b98a9c (diff)
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`.
Diffstat (limited to 'vterm.el')
-rw-r--r--vterm.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/vterm.el b/vterm.el
index bf75ce4..2f32319 100644
--- a/vterm.el
+++ b/vterm.el
@@ -1789,6 +1789,7 @@ If REMEMBERING-POS-P is not nil remembering their positions in a buffer-local
(goto-char (point-max))
(when (and (bolp)
+ (not (bobp))
(get-text-property (1- (point)) 'vterm-line-wrap))
(forward-char -1)
(when remembering-pos-p