var finder = {\r
searchRange : null,\r
matchRange : null,\r
- find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched )\r
+ find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun )\r
{\r
if( !this.matchRange )\r
this.matchRange =\r
this.matchRange.removeHighlight();\r
// Clear current session and restart with the default search\r
// range.\r
- if ( matchCyclic )\r
+ // Re-run the finding once for cyclic.(#3517)\r
+ if ( matchCyclic && !cyclicRerun )\r
{\r
this.searchRange = getSearchRange( true );\r
this.matchRange = null;\r
+ return arguments.callee.apply( this,\r
+ Array.prototype.slice.call( arguments ).concat( [ true ] ) );\r
}\r
\r
return false;\r