()
| 13966 | searchCursor.replace(newText); |
| 13967 | } |
| 13968 | function next() { |
| 13969 | // The below only loops to skip over multiple occurrences on the same |
| 13970 | // line when 'global' is not true. |
| 13971 | while(searchCursor.findNext() && |
| 13972 | isInRange(searchCursor.from(), lineStart, lineEnd)) { |
| 13973 | if (!global && lastPos && searchCursor.from().line == lastPos.line) { |
| 13974 | continue; |
| 13975 | } |
| 13976 | cm.scrollIntoView(searchCursor.from(), 30); |
| 13977 | cm.setSelection(searchCursor.from(), searchCursor.to()); |
| 13978 | lastPos = searchCursor.from(); |
| 13979 | done = false; |
| 13980 | return; |
| 13981 | } |
| 13982 | done = true; |
| 13983 | } |
| 13984 | function stop(close) { |
| 13985 | if (close) { close(); } |
| 13986 | cm.focus(); |
no test coverage detected