Subject: bug#75794: [PATCH] feat(icomplete): markers and vertical alignment

From: Rahul Martim Juliato <[email-masked]>
Date: Tue, 25 Feb 2025 22:24:15 -0300

Eli Zaretskii <[email-masked]> writes:

>> From: Rahul Martim Juliato <[email-masked]>
>> Cc: [email-masked]
>> 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