From ba55945617f04763f9e93525fdf1e2826e4d667a Mon Sep 17 00:00:00 2001 From: JenChieh Date: Wed, 26 Jun 2024 17:47:49 -0700 Subject: [PATCH] fix: Sip virtual line completely --- sideline.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sideline.el b/sideline.el index b345c93..4911d4d 100644 --- a/sideline.el +++ b/sideline.el @@ -442,10 +442,12 @@ available lines in both directions (up & down)." (when-let* ((occ-bol (line-beginning-position)) ((and (not (memq occ-bol occupied-lines)) (not break-it))) - (col (sideline--calc-space str-len on-left (sideline--opposing-str-len)))) - (setq data (list (sideline--column-to-point (car col)) - (sideline--column-to-point (cdr col)) - occ-bol)) + (col (sideline--calc-space str-len on-left (sideline--opposing-str-len))) + (pos-start (sideline--column-to-point (car col))) + (pos-end (sideline--column-to-point (cdr col))) + ;; Skip virtual line from `truncate-lines'. + ((= pos-start pos-end))) + (setq data (list pos-start pos-end occ-bol)) (setq break-it t) (push occ-bol occupied-lines)) (when (if going-up (bobp) (eobp)) (setq break-it t))))