GNU bug report logs -
#75794
[PATCH] feat(icomplete): markers and vertical alignment
Previous Next
Full log
Message #31 received at 75794 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Rahul Martim Juliato <rahuljuliato <at> gmail.com>
>> Cc: 75794 <at> debbugs.gnu.org
>> Date: Tue, 18 Feb 2025 17:17:07 -0300
>>
>> Given current `icomplete-vertical--adjust-lines-for-column', I think we
>> could fix:
>>
>> - 3) maybe with some "align to the right". Is there a any helper
>> function that would take some content and print it fitting
>> right-aligned or I'd have to implement it myself?
>>
>> - 6, 7) Here I think the trick is having a way to check current column position,
>> vs. visual total columns (I mean the total columns of any line wrapped
>> or not fitting the current window), if current column is greater than
>> the later, we subtract the visual total columns, so it is aligned.
>> Again, are there helper functions to make this positioning of the
>> cursor and window,column,width querying easier?
>
> I'm not sure I understand what helper functions you are looking for.
> The function window-hscroll will tell you by how many columns the
> current window is scrolled horizontally -- is that what you are
> looking for?
Hello there Eli!
Thanks for your help! This function indeed helps, but I went another
direction with something alike.
I know I am a slow contributtor, I'm steady and slowing evolving on this
matter (don't give up on me :D).
Just so I don't leave you in the dark, I'm working in a version that
already works on non truncated lines (aka lines that are shown wrapped).
Given this test case:
https://0x0.st/8AE1.png
We can start completion from whathever point of the line:
https://0x0.st/8AEj.png
https://0x0.st/8AEQ.png
https://0x0.st/8AE2.png
I'll shave some more edge cases before submitting a new patch.
--
Rahul Martim Juliato
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.