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

Use v:echospace to avoid hit-Enter prompts #285

Closed
wants to merge 3 commits into from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Oct 22, 2019

Fixes #166
Followup-to #167

endif

let msg_len = len(substitute(a:msg, '.', '.', 'g'))
if msg_len > max_cmd_len
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also use strwidth maybe if available?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it ain't broke don't fix it.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the substitute() needed here?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Character length rather than byte length.

autoload/dispatch.vim Outdated Show resolved Hide resolved
autoload/dispatch.vim Outdated Show resolved Hide resolved

if exists('v:echospace')
if strwidth(a:msg.' '.a:suffix) > v:echospace
let msg = printf('%.*S...', v:echospace - 3 - len(a:suffix), a:msg)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the < notation from the other format, not an ellipsis.

@petobens
Copy link

Any chance of moving this forward @blueyed @tpope ? It would be a really nice addition... Thanks!

@blueyed
Copy link
Contributor Author

blueyed commented Feb 8, 2020

@petobens
I feel like if I'd fix/amend it @tpope would do it himself anyway - so it's waiting on him.

@petobens
Copy link

petobens commented Feb 8, 2020

OK. Let's wait for @tpope then. Thanks

@tpope
Copy link
Owner

tpope commented Feb 8, 2020

If I was going to do it myself I would have done it myself rather than explicitly requesting changes.

@petobens
Copy link

Ok @blueyed can you wrap this up then? It's really annoying to press enter. Thank you so much in advance

@lourenci
Copy link
Contributor

lourenci commented Jun 4, 2020

Hi, @blueyed. Is there some advance on this? Thank you for this.

@tpope tpope closed this in b32bde7 Apr 17, 2021
@blueyed blueyed deleted the echospace branch April 17, 2021 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Displaying the executed command might cause hit-Enter prompt
5 participants