[ nedit-Patches-1644697 ] timer_add()/timer_remove() macros

Tony Balinski ajbj at free.fr
Thu Jan 25 23:56:40 CET 2007


Quoting Bert Wesarg <wesarg at informatik.uni-halle.de>:

> >> Summary: timer_add()/timer_remove() macros
> >>
> >> Initial Comment:
> >> this adds two new macro subroutines for handling timeouts
> >>
> >> syntax:
> >> timeoutid timer_add(string macro_subroutine_name, int timeout_in_msec);
> >>
> >> void timer_remove(timeoutid id);
> >
> > Bert,
> >
> > Looks interesting. What did you write them for? What problem do they
> address?
>
> one word: 'word completion with calltips'
>
> I use the dictionary patch from Christian Merkwirth, which is dated from
> March 2000, but apply without any problems. with the Patch Collection I
> can select single lines from the calltip. and with the idea of the
> file_open_hook() I added an modified_hook() (added to
> window.c:modifiedCB()) and an cursor_moved_hook() (added to
> window.c:movedCB()). so on every modification I can check if the cursor is
> on an right word boundary and can display a calltip with the suggestions.
> The arrow up/down keys are overloaded, so if a calltip is displayed I can
> select a completion, with enter its pasted to the buffer. the problem is,
> most of the time the calltip disrupt my normal writing with the arrow
> keys. so I think of the possibility to display the calltip only after an
> timeout, when the cursor stands still. To be clear only on a modiefedCB()
> a calltip is displayed, the movedCB() is only needed to remove a calltip,
> but only with the right/left keys, because the up/down keys are overloaded.
>
> so these macros provide me exactly that.

Cool!

Tony


More information about the Develop mailing list