Re: Request: new command: cmcSearchAgainBackward
Brought to you by:
set
From: Thiago F.G. A. <tf...@te...> - 2006-02-04 15:27:55
|
Old thread... On Thu, 2 Dec 2004, Salvador Eduardo Tropea wrote: > Ok, about this "UltraEdit" feature: > > I added what I understood from Sergio's description ;-) > Please try the CVS code and tell me if that's more or less what you want. > > The new commands are called: cmcSearchSelForward and cmcSearchSelForward. > They have menu entries in the "Search" menu, but no shortcut yet. > Not yet documented because they could change. > > I coded them in a way that they shouldn't interfere with ^Q+F/^L. > > A lot of details remains to be adjusted like: > 1) I implemented it as a case sensitive search, but it could be case > sensitive only for case sensitive languages or just don't be case sensitive. > I'm not sure what's best. > 2) I'm starting from the other end of the file when the search fails. This is > silently done and as the text comes from a selection the second search *must* > be successful so I never inform things like "not found". Ok, but I'd like to see something along the lines of "search wrapped, continued from [ TOP | BOTTOM ]" in the status bar. 2) 'Whole words only' should be turned on. 3) When there is no selection, select the current word. I implemented this with macros, but maybe this could be part of the behaviour of the command. In case anyone is interested: (defmacro 'SearchSelForward' (progn (if (not (SelectionExists)) (SendCommands cmcMarkWord)) (SendCommands cmcSearchSelForward) ) ) (defmacro 'SearchSelBackward' (progn (if (not (SelectionExists)) (SendCommands cmcMarkWord)) (SendCommands cmcSearchSelBackward) ) ) Maybe this whole stuff can be implemented entirely in sLisp, now that we have the commands FindString and FindAgain. -- Thiago F. G. Albuquerque () ascii ribbon campaign - against html mail /\ - against microsoft attachments |