GNU bug report logs - #75794
[PATCH] feat(icomplete): markers and vertical alignment

Previous Next

Package: emacs;

Reported by: Rahul Martim Juliato <rahuljuliato <at> gmail.com>

Date: Fri, 24 Jan 2025 02:52:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Rahul Martim Juliato <rahuljuliato <at> gmail.com>
Cc: 75794 <at> debbugs.gnu.org
Subject: bug#75794: [PATCH] feat(icomplete): markers and vertical alignment
Date: Sat, 15 Feb 2025 13:55:27 +0200
> From: Rahul Martim Juliato <rahuljuliato <at> gmail.com>
> Cc: 75794 <at> debbugs.gnu.org
> Date: Sun, 09 Feb 2025 20:08:56 -0300
> 
> >> > +(defun icomplete-vertical--adjust-lines-for-column (lines buffer data)
> >> > +  "Adjust the LINES to align with the column in BUFFER based on DATA."
> >> > +  (if icomplete-vertical-in-buffer-adjust-list
> >> > +      (let ((column
> >> > +             (with-current-buffer buffer
> >> > +               (save-excursion
> >> > +                 (goto-char (car data))
> >> > +                 (current-column)))))
> >> > +        (dolist (l lines)
> >> > +          (add-text-properties
> >> > +           0 1 `(display ,(concat (make-string column ?\s) (substring l 0 1)))
> >> > +           l))
> >> > +        lines)
> >> > +    lines))
> >> 
> >> Did you test this with a window horizontally scrolled (when
> >> truncate-lines is non-nil)?  What about continuation lines?  In both
> >> these cases, current-column is different from the visual column on the
> >> screen, counted from the left edge of the window.
> >> 
> 
> I think you meant when `truncate-lines' is `nil'. When it is 't, no
> problems.

Including when the window is horizontally scrolled?

> When it is nil and we're dealing with wrapped lines, this
> "works" with the annoying addition of a 'blank wrapped line' between
> candidates.
> 
> I could not figure out how to fix it properly. Any tips?

If you need to know whether a line is continued or not, you can use
the function display--line-is-continued-p.  If that's not what you
need, please tell more details.




This bug report was last modified 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.