On 5/7/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
On 5/7/06, Eric Arnold <[EMAIL PROTECTED]> wrote:
> On 5/7/06, Yakov Lerner <[EMAIL PROTECTED]> wrote:
> > On 5/7/06, Eric Arnold <[EMAIL PROTECTED]> wrote:
> >
> > Can you clarify coulpe of points.
> >
> > 1.
> > a) Is this event fired when getchar() or vim extract event
> >     from typeahead buffer for processing ?, or
>
> yes
>
>
> > b) only when getchar() is invoked ? , or
> > c) when the char is  inserted into typeahead buffer ?
> > Can you clarify this ?
> >
> > 2. The docs patch says:
> >
> > +                                                Changing |v:getchar|
> > +                               changes the value returned by the
> > +                               |getchar()|function.
> >
> > I don't understand why this sentence doesn't mention that
> > 'Changing |v:getchar| changes the value returned by the getchar() or seen by
> > vim when vim read characters from typeahead buffer for processing',
> > because it follows from your other examples that changing
> > v:getchar can change which char vim will see ?
>
>
> Correct.  It actually changes what is returned by  vgetc()  .  I
> should reword it.

Can I assign to  v:getchar a string like "\<F1>" ?

Yes

What happens if I assign longer string like "abc" to v:getchar ?
Will vim see only 'a', or vim will see eventually also 'b' and 'c' ?

It will treat it as a single char, and fail internally.  I don't seem
to get an err code from Vim, though.

Can I assign something to v:getchar to tell it "drop this
character, as if there is no input" ?

Yakov


Yes,

let v:getchar = ""

Looks like the doc page will be growing :-)

Reply via email to