<<< Date Index >>>     <<< Thread Index >>>

Re: keyboard handling (specifically mutt_getch)



* Allister MacLeod <amacleod@xxxxxxxx> [2003-12-16 01:38 -0500]:
> I'm trying to figure out the normal flow of the km_dokey() function in
> mutt, and was curious about the line (around 390 of keymap.c):
> 
>     /* do we have an op already? */
>     if (tmp.op)
>     {
>     ...
> 
> As far as I can tell, tmp is only ever set by assignment from the
> mutt_getch() function.  Upon reading that function, it looks like
> maybe the .op field of the return value is only ever set when there is
> an error (and then its value is OP_NULL).  I'm not sure, though.  Can
> anyone tell me whether there are other cases where tmp.op would be
> nonzero?

IIRC it could be set while getting data from the unget buffer, while
executing macros (the <command> strings are converted to .op before
they are unget).

Nicolas