Ticket #3517: 3517_2.patch

File 3517_2.patch, 1.0 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/find/dialogs/find.js

     
    425425                var finder = {
    426426                        searchRange : null,
    427427                        matchRange : null,
    428                         find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched )
     428                        find : function( pattern, matchCase, matchWord, matchCyclic, highlightMatched, cyclicRerun )
    429429                        {
    430430                                if( !this.matchRange )
    431431                                        this.matchRange =
     
    480480                                this.matchRange.removeHighlight();
    481481                                // Clear current session and restart with the default search
    482482                                // range.
    483                                 if ( matchCyclic )
     483                                // Re-run the finding once for cyclic.(#3517)
     484                                if ( matchCyclic && !cyclicRerun )
    484485                                {
    485486                                        this.searchRange = getSearchRange( true );
    486487                                        this.matchRange = null;
     488                                        return arguments.callee.apply( this,
     489                                                Array.prototype.slice.call( arguments ).concat( [ true ] ) );
    487490                                }
    488491
    489492                                return false;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy