1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: When doing local search do not split query into words

This commit is contained in:
Laurent Cozic 2019-06-25 23:09:53 +01:00
parent 484f290eb0
commit 1e3c6ed98c
2 changed files with 8 additions and 3 deletions

View File

@ -1795,6 +1795,7 @@ class NoteTextComponent extends React.Component {
accuracy: 'partially',
}]
markerOptions.selectedIndex = this.state.localSearch.selectedIndex;
markerOptions.separateWordSearch = false;
} else {
const search = BaseModel.byId(this.props.searches, this.props.selectedSearchId);
if (search) {

View File

@ -205,15 +205,19 @@
elementIndex++;
}
const markKeywordOptions = {
each: onEachElement,
};
if ('separateWordSearch' in options) markKeywordOptions.separateWordSearch = options.separateWordSearch;
for (let i = 0; i < keywords.length; i++) {
let keyword = keywords[i];
markJsUtils.markKeyword(mark_, keyword, {
pregQuote: pregQuote,
replaceRegexDiacritics: replaceRegexDiacritics,
}, {
each: onEachElement,
});
}, markKeywordOptions);
}
ipcProxySendToHost('setMarkerCount', elementIndex);