tumashu / ivy-posframe

ivy-posframe is a ivy extension, which let ivy use posframe to show its candidate menu, ivy-posframe is a **GNU ELPA** package.
414 stars 26 forks source link

Ivy-posframe does not truncate lines (cursor goes out of frame when typing long lines) #123

Open ianyepan opened 2 years ago

ianyepan commented 2 years ago

As titled, ivy-posframe doesn't seem to support "truncate lines" and when I'm typing a long file name, the cursor can disappear from the right edge of the screen (but I'm still able to continue typing). Here's a screenshot to explain myself:

image

Here's how ivy normally handles it.

Ivy would first try to put the long line on the next line. If the space is still not enough, it'll scroll right as the user types, keeping the cursor always visible at the right edge of the frame, and pushing text on the left side out of the screen. Basically how you'd type a long URL in a browser textbox -- the start of the URL might not be visible, but the cursor should always be visible. Let me know if I'm explaining this clearly enough. Cheers!

tumashu commented 2 years ago

Yes, because "truncate lines" looks very ugly, posframe support it with lines-truncate argument, but ivy-posframe do not use it.

ianyepan commented 2 years ago

I see, then is it possible to keep the cursor visible at all times (at the right edge of the frame while pushing left edge's content out of the frame, like normal textbox design). I've tried to describe this behavior in my last paragraph above -- let me know what you think! I'm actually surprised that no one brought this up (am I missing something?). Surely people have had to find-file in a deeply nested folder structure and hence having a long file name that goes off the screen.

jrasband commented 2 years ago

This is also an issue for me. It's possible to see the full file name if you set ivy-truncate-lines to nil, but it looks very ugly. I think that the suggested behavior from @ianyepan would be ideal.