El 17/11/18 a las 12:31, Phil Thompson escribió:
On 16 Nov 2018, at 8:31 pm, Manuel Gómez <[email protected]> wrote:
How should a search be canceled so a subsequent call to replace does nothing?

Call findFirst() with an empty search string.

Thank you, that worked.



But if the user makes any selection before opening the dialog, the incorrect 
text is replaced, not fulfilling the searched term. Any better solution?

I could add a cancelFind() which does the same as findFirst('').

That would be more clear. Another option is, at least, mentioning it in the findFirst documentation.

I think that not knowing how to reset a search is the reason why I'm not using findNext in my code (only repetitive calls to findFirst). Without a way to reset the search, findNext seems more difficult to use than only calls to findFirst skipping the selection if the user searches backwards.

Regards,

Manuel
_______________________________________________
QScintilla mailing list
[email protected]
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to