@@ -289,43 +289,44 @@ CString strStatus = TFormat ("Finding: %s", (LPCTSTR) FindInfo.m_strFindStringLi
289
289
WrapUpFind (FindInfo);
290
290
return true ; // found it!
291
291
} // end if found
292
- else
293
- {
294
- // nothing found, try previous line
295
- FindInfo.m_nCurrentLine --;
296
- continue ; // skip other testing
297
- } // end if not found
292
+
293
+ // nothing found, try previous line
294
+ FindInfo.m_nCurrentLine --;
295
+ continue ; // skip other testing
298
296
299
297
} // end of searching backwards with repeat on same line
300
298
301
299
// if text found on this line, then we have done it!
302
300
303
- if (FindInfo.m_bRegexp )
301
+ if (maximum ( FindInfo.m_iStartColumn , 0 ) < strLine. GetLength () )
304
302
{
305
-
306
- if (regexec (FindInfo.m_regexp , strLine, maximum (FindInfo.m_iStartColumn , 0 )))
303
+ if (FindInfo.m_bRegexp )
307
304
{
308
- // work out what column it must have been at
309
- FindInfo.m_iStartColumn = FindInfo.m_regexp ->m_vOffsets [0 ];
310
- FindInfo.m_iEndColumn = FindInfo.m_regexp ->m_vOffsets [1 ];
311
- WrapUpFind (FindInfo);
312
- return true ; // found it!
313
- }
314
- } // end of regular expression
315
- else
316
- { // not regular expression
317
305
318
- // if case-insensitive search wanted, force this line to lower case
319
- if (!FindInfo.m_bMatchCase )
320
- strLine.MakeLower ();
321
- if ((FindInfo.m_iStartColumn = strLine.Find (strFindString, maximum (FindInfo.m_iStartColumn , 0 ))) != -1 )
322
- {
323
- // work out ending column
324
- FindInfo.m_iEndColumn = FindInfo.m_iStartColumn + strFindString.GetLength ();
325
- WrapUpFind (FindInfo);
326
- return true ; // found it!
327
- } // end of found
328
- } // end of not regular expression
306
+ if (regexec (FindInfo.m_regexp , strLine, maximum (FindInfo.m_iStartColumn , 0 )))
307
+ {
308
+ // work out what column it must have been at
309
+ FindInfo.m_iStartColumn = FindInfo.m_regexp ->m_vOffsets [0 ];
310
+ FindInfo.m_iEndColumn = FindInfo.m_regexp ->m_vOffsets [1 ];
311
+ WrapUpFind (FindInfo);
312
+ return true ; // found it!
313
+ }
314
+ } // end of regular expression
315
+ else
316
+ { // not regular expression
317
+
318
+ // if case-insensitive search wanted, force this line to lower case
319
+ if (!FindInfo.m_bMatchCase )
320
+ strLine.MakeLower ();
321
+ if ((FindInfo.m_iStartColumn = strLine.Find (strFindString, maximum (FindInfo.m_iStartColumn , 0 ))) != -1 )
322
+ {
323
+ // work out ending column
324
+ FindInfo.m_iEndColumn = FindInfo.m_iStartColumn + strFindString.GetLength ();
325
+ WrapUpFind (FindInfo);
326
+ return true ; // found it!
327
+ } // end of found
328
+ } // end of not regular expression
329
+ } // end of start column being inside the line
329
330
330
331
// keep track of line count
331
332
0 commit comments