autocomplete-ALL-the-things icon indicating copy to clipboard operation
autocomplete-ALL-the-things copied to clipboard

Previews in overlay

Open vifon opened this issue 11 years ago • 8 comments

Right now, when the user is cycling through the possible completions, each one is pasted into the terminal after backspace-ing the previous one. It's not very elegant solution. I consider replacing (probably as an option) this approach with an overlay overshadowing the actual text and pasting the text only once.

vifon avatar Jul 10 '14 15:07 vifon

Proof of concept patch here: https://gist.github.com/Vifon/48d76bd66a2cc983b744

vifon avatar Jul 10 '14 16:07 vifon

Ah, finally I understand issue... Can you please push edits to dev branch, so I can pull and test it?

seletskiy avatar Jul 11 '14 13:07 seletskiy

I'd rather not. This code is a mess. It's just enough for it to work. Just download the patch and apply it to the current master.

Please, let me know what you think about it.

vifon avatar Jul 11 '14 14:07 vifon

I've found following issues: cursor is missing after overlay (is it even possible in urxvt to set cursor position? can we send escape codes from plugin?) and backspace key works incorrectly.

I think that best way to solve issue will be try to mimic normal text on terminal, so user can not tell that it is actual overlay.

BTW, it is better to use dev branch, because of it's easier to pull and propose changes. You can always amend commits and even delete dev branch, so it's actually doesn't matter how messy code is...

seletskiy avatar Jul 11 '14 16:07 seletskiy

Yeah, I know. It's only a proof of concept to show you exactly what I've been talking about.

That's my intention to mimic the normal text style. :)

If it was even a little more than a throwaway code, I'd do this. But I think writing it from scratch would be better.

vifon avatar Jul 11 '14 16:07 vifon

Anyway, do you think it is an issue at all, or should we just leave it as it is now? I'm still sitting on the fence. Simplicity may suffer and it was not a real usability issue for the whole time I've been using it.

vifon avatar Jul 11 '14 18:07 vifon

I understand that inserting and backspacing text is not a good way to cycle through completion variants, but I didn't found any actual problem with this solution yet. So, maybe this should be frozen until real problem arises?

Proposed solution harder to implement and has corner cases to which I can't imagine solution (e.g. multiline completion in curses applications, where beginning of the line is located at column 0, like in vim).

seletskiy avatar Jul 12 '14 04:07 seletskiy

Seems reasonable. That's what I was thinking too.

vifon avatar Jul 12 '14 16:07 vifon