|
54 | 54 |
|
55 | 55 | function getSearchCursor(cm, query, pos) { |
56 | 56 | // Heuristic: if the query string is all lowercase, do a case insensitive search. |
57 | | - return cm.getSearchCursor(query, pos, queryCaseInsensitive(query)); |
| 57 | + return cm.getSearchCursor(query, pos, {caseFold: queryCaseInsensitive(query), multiline: true}); |
58 | 58 | } |
59 | 59 |
|
60 | 60 | function persistentDialog(cm, text, deflt, onEnter, onKeyDown) { |
|
99 | 99 | } |
100 | 100 |
|
101 | 101 | var queryDialog = |
102 | | - 'Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>'; |
| 102 | + '<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>'; |
103 | 103 |
|
104 | 104 | function startSearch(cm, state, query) { |
105 | 105 | state.queryText = query; |
|
188 | 188 |
|
189 | 189 | var replaceQueryDialog = |
190 | 190 | ' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>'; |
191 | | - var replacementQueryDialog = 'With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>'; |
192 | | - var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>"; |
| 191 | + var replacementQueryDialog = '<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>'; |
| 192 | + var doReplaceConfirm = '<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>'; |
193 | 193 |
|
194 | 194 | function replaceAll(cm, query, text) { |
195 | 195 | cm.operation(function() { |
|
205 | 205 | function replace(cm, all) { |
206 | 206 | if (cm.getOption("readOnly")) return; |
207 | 207 | var query = cm.getSelection() || getSearchState(cm).lastQuery; |
208 | | - var dialogText = all ? "Replace all:" : "Replace:" |
| 208 | + var dialogText = '<span class="CodeMirror-search-label">' + (all ? 'Replace all:' : 'Replace:') + '</span>'; |
209 | 209 | dialog(cm, dialogText + replaceQueryDialog, dialogText, query, function(query) { |
210 | 210 | if (!query) return; |
211 | 211 | query = parseQuery(query); |
|
0 commit comments