Ticket #3790: 3790.patch
File 3790.patch, 1.8 KB (added by , 15 years ago) |
---|
-
_source/plugins/find/dialogs/find.js
496 496 replaceCounter : 0, 497 497 498 498 replace : function( dialog, pattern, newString, matchCase, matchWord, 499 matchCyclic , matchReplaceAll)499 matchCyclic ) 500 500 { 501 501 // Successiveness of current replace/find. 502 502 var result = false; … … 531 531 else 532 532 result = this.find( pattern, matchCase, matchWord, matchCyclic ); 533 533 534 // Recusively replace all matches. 535 if ( matchReplaceAll && result ) 536 this.replace.apply( this, Array.prototype.slice.call( arguments ) ); 537 538 return matchReplaceAll ? 539 this.replaceCounter : result; 534 return result; 540 535 } 541 536 }; 542 537 … … 703 698 // Scope to full document. 704 699 finder.searchRange = getSearchRange( true ); 705 700 finder.matchRange = null; 706 if ( ( replaceNums =finder.replace( dialog,701 while( finder.replace( dialog, 707 702 dialog.getValueOf( 'replace', 'txtFindReplace' ), 708 703 dialog.getValueOf( 'replace', 'txtReplace' ), 709 704 dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ), 710 705 dialog.getValueOf( 'replace', 'txtReplaceWordChk' ), 711 false, true ) ) ) 712 alert( editor.lang.findAndReplace.replaceSuccessMsg.replace( /%1/, replaceNums ) ); 706 false ) ) 707 ; 708 709 if ( finder.replaceCounter ) 710 alert( editor.lang.findAndReplace.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) ); 713 711 else 714 712 alert( editor.lang.findAndReplace.notFoundMsg ); 715 713 }