A slight improvement in the format of the output from the
code fragment in what I wrote a little while ago:
> Steve Hall Sent on Saturday, May 06, 2006
> > On Fri, 2006-05-05 at 02:25 -0600, Eric Arnold wrote:
> > > On 5/4/06, Steve Hall <[EMAIL PROTECTED]> 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.
> > >
> > > Are you saying you always want the first entry?
> >
> > No, I want the user to be able to select from the list, but I'm
> > trying to call this via function so I can map it, do some
> > additional processing around it, etc.
>
> Really was hard to figure out what you are after. And if I
> understand you in your other post of today correctly, you
> want to use z= rather than spellsuggest() because you do
> not want to write the following type of code (even though
> the following type of code would do what you are after):
>
> let index = 0
> let b=['Select word:']
> for item in spellsuggest('fooey', 10)
> let index += 1
> let b += [index.'. '.item]
> endfor
> let correct=inputlist(b)
For better looking output, replace the assignment to b above with:
let b += [printf("%2d. %s", index, item)]
--Suresh