inkarkat / vim-ingo-library

Vimscript library of common functions
91 stars 7 forks source link

ingo#avoidprompt#MaxLength doesn't work in some situation #1

Closed an9wer closed 6 years ago

an9wer commented 6 years ago

Hi, I find the prompt is still existed when I call the ingo#avoidprompt#Echo function with set noshowcmd, set ruler and set rulerformat='' options.

I find it may be caused by the l:maxLength value returned by the ingo#avoidprompt#MaxLength function. And then I change the code line 60 to let l:maxLength -= 2 and it works well.

Is it a bug or I missed something required?

inkarkat commented 6 years ago

The necessary offsets have been determined by trial-and-error. Maybe that was wrong from the beginning, maybe something changed in some Vim version; I don't know. (And I still see mismatches that I cannot fully explain.)

I found that (in Vim version 8.0.1505), one (but not two, as you've reported) more needs to be subtracted. In any case, you can always use the g:rulerwidth variable to tweak this.

Thanks for reporting this; I hope this change will help!