Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17579
Modified Files:
find.py
Log Message:
Patch from Matthias Haldimann: if there is a selection, use that as the
default search string.
Index: find.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/find.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** find.py 20 Jan 2004 01:56:36 -0000 1.9
--- find.py 16 Jun 2005 08:59:11 -0000 1.10
***************
*** 172,175 ****
--- 172,183 ----
self.editFindText.SetWindowText(defaultSearch.findText)
+ control = _GetControl()
+ # If we have a selection, default to that.
+ sel = control.GetSelText()
+ if (len(sel) != 0):
+ self.editFindText.SetWindowText(sel)
+ if (defaultSearch.remember):
+ defaultSearch.findText = sel
+
self.editFindText.SetSel(0, -2)
self.editFindText.SetFocus()
|