I forgot CC:[EMAIL PROTECTED] Then I'll send you twice.
Jared wrote:
> On 5/14/2006 1:37 AM, Gerald Lai wrote:
>> On Sun, 14 May 2006, Yakov Lerner wrote:
>>> Try 2 things
>>> (1) add :redraw before the :echo in question
>>> (2) if that doesn't help, make message shorter.
>>> I noticed that if message is longer than screen width-15,
>>> it cases the prompt.
>> >> You could also readjust the height of the command-line dynamically: >> >> let msg = "str"
>>   let len = strlen(substitute(msg, ".", "x", "g"))
>>   let t_ch = &cmdheight
>>   let &cmdheight = len / (&columns - 15) + 1
>>   echo msg
>>   let &cmdheight = t_ch
>> >> See ":help 'cmdheight'" & ":help strlen()".
> > > I tried adding :redraw, but that didn't seem to work. As for making the
> message shorter or the changing the height, I don't think those are
> applicable.  The line is not longer than the window width.  In fact, this is
> the function:
> > function Toggle_spell()
>    if &spell
>       exec "set nospell"
>    else
>       exec "set spell"
>       echo "]s to skip to word, zg to add word, z= to suggest word"
>    endif
> endfunction
> nmap <C-s> :call Toggle_spell()<CR>
> > I just want to display a message in the status reminding me of the commands
> when I enable the spell checker.
> > Any other ideas? Thanks.

I think that your 'cmdheight' is 1 and 'showcmd' or 'ruler' is on and
perhaps 'laststatus' is 0 or 1.
How about this

let ru_save = &ruler
let sc_save = &showcmd
set noruler noshowcmd
echo "]s to skip to word, zg to add word, z= to suggest word"
let &showcmd = sc_save
let &ruler = ru_save

But the message may be truncated when there is no space for showcmd and
ruler.  It seems that showcmd and ruler require some spaces on the right
side of cmdline area.

--
Yukihiro Nakadaira <[EMAIL PROTECTED]>

Reply via email to