Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy display when using Alt-l (__fish_list_current_token) #718

Closed
terlar opened this issue May 8, 2013 · 6 comments
Closed

Buggy display when using Alt-l (__fish_list_current_token) #718

terlar opened this issue May 8, 2013 · 6 comments
Labels
bug Something that's not working as intended
Milestone

Comments

@terlar
Copy link
Contributor

terlar commented May 8, 2013

If you have one line prompt it is kind of okay, but it would be better if the list started on the next line.

screen shot 2013-05-08 at 09 26 50

This can be solved like this, but would be good if it was default behavior.

  bind \el 'echo; __fish_list_current_token'

However if you have a multi-line prompt it looks like this:
screen shot 2013-05-08 at 09 31 35

As you can see the prompt is covering the output which is not very useful.

@dag
Copy link
Contributor

dag commented May 8, 2013

I'd like to see this fixed too. In fact I think it's better even with a single-line prompt. However, your fix doesn't work for me, which seems to be partially due to my complex prompt, but even if I use a simple multi-line prompt it still paints the first line of the prompt over the last line of the current token list. What seems to do the trick for me is to add an echo for each extra line in the prompt, after the __fish_list_current_token function:

bind \el 'echo; __fish_list_current_token; echo'

However, the above isn't sufficient for a three-line prompt, and for a one-line prompt it results in an extra empty line being printed.

Perhaps a better fix would involve changes to commandline -f repaint instead?

@dag
Copy link
Contributor

dag commented May 8, 2013

So after writing the above I realized you probably weren't saying that your echo trick fixes the problems with multi-line prompts. Your second screenshot is with your rebinding, right?

@dag
Copy link
Contributor

dag commented May 8, 2013

Actually, perhaps this could use fish_pager instead, which seems to behave correctly. I don't know how to use fish_pager though so I can't try it.

@terlar
Copy link
Contributor Author

terlar commented May 8, 2013

The second screenshot is without any rebinding.

I have the binding you mentioned, which works for two-line-prompts. But adds extra new-line to single-line prompt and as you say doesn't work for 3 line prompts for example.

Inspecting the __fish_list_current_token, I see it is using commandline -f repaint so I guess these two issues are related as you suspect. Also don't know how fish_pager works and if it is intended to be used for anything else than completions.

@mbyio
Copy link

mbyio commented May 18, 2015

Is there a reason this hasn't been looked into for two years? If it's just an issue of finding someone to fix it, maybe I can take a crack at it?

@ridiculousfish
Copy link
Member

Yup, that's all. If it's biting you, go for it!

@krader1961 krader1961 added the bug Something that's not working as intended label Mar 18, 2016
@krader1961 krader1961 self-assigned this Mar 18, 2016
@faho faho modified the milestones: 2.3.0, fish-future Mar 19, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

6 participants