On Fri, 2006-05-05 at 09:22 +0200, Bram Moolenaar wrote:
> Steve Hall wrote:
>
> > Is there a way to avoid the "Press ENTER or type command to
> > continue" when requesting spelling suggestions from a :normal z=
> > call in a function?
> >
> > I'm not able to make any of the usual tricks (&shm, raising the
> > command height) work, and this statement blocks user input.
>
> Why not use spellsuggest()?

That seems a lot of overhead to process the list and make a
menu/popup, especially given z= usefulness.

> It works when you set the maximum number of entries in
> 'spellsuggest' to less than the value of 'cmdheight'.

I keep cmdheight small so my editing area is large. z= usefully
expands it except...

> ":silent normal z=" also works. That's probably what you should do
> if you want to catch the output with a redirection.

I'm not trying to capture anything, but when called in a function the
screen refresh happens after the function has already terminated.

  1: function! MySpellAlts()
  2:     let mycmdheight = &cmdheight
  3:     set cmdheight=13
  4:     set spellsuggest=10
  5:     silent normal z=
  6:     let &cmdheight = mycmdheight
  7: endfunction
  8: imap <M-F7> <C-o>:call MySpellAlts()<CR>

I can find no way to configure line 5 to make this work, I've tried
omitting the "silent", using a literal key <C-o>...


-- 
Steve Hall  [ digitect mindspring com ]

Reply via email to