()
| 13952 | var done = false; |
| 13953 | var lastPos = searchCursor.from(); |
| 13954 | function replaceAll() { |
| 13955 | cm.operation(function() { |
| 13956 | while (!done) { |
| 13957 | replace(); |
| 13958 | next(); |
| 13959 | } |
| 13960 | stop(); |
| 13961 | }); |
| 13962 | } |
| 13963 | function replace() { |
| 13964 | var text = cm.getRange(searchCursor.from(), searchCursor.to()); |
| 13965 | var newText = text.replace(query, replaceWith); |