-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Conversation
endif | ||
|
||
let msg_len = len(substitute(a:msg, '.', '.', 'g')) | ||
if msg_len > max_cmd_len |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
||
if exists('v:echospace') | ||
if strwidth(a:msg.' '.a:suffix) > v:echospace | ||
let msg = printf('%.*S...', v:echospace - 3 - len(a:suffix), a:msg) |
There was a problem hiding this comment.
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.
OK. Let's wait for @tpope then. Thanks |
If I was going to do it myself I would have done it myself rather than explicitly requesting changes. |
Ok @blueyed can you wrap this up then? It's really annoying to press enter. Thank you so much in advance |
Hi, @blueyed. Is there some advance on this? Thank you for this. |
Fixes #166
Followup-to #167