[pywin32-checkins] pywin32/Pythonwin/pywin/scintilla find.py, 1.12, 1.13
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2009-01-31 03:07:30
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18602/pywin/scintilla Modified Files: find.py Log Message: Fix error in find dialog when no documents were open Index: find.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/find.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** find.py 1 Oct 2008 14:44:53 -0000 1.12 --- find.py 31 Jan 2009 03:07:25 -0000 1.13 *************** *** 173,182 **** 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) --- 173,185 ---- self.editFindText.SetWindowText(defaultSearch.findText) control = _GetControl() ! # _GetControl only gets normal MDI windows; if the interactive ! # window is docked and no document open, we get None. ! if control: ! # 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) |