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:
parent
484f290eb0
commit
1e3c6ed98c
@ -1795,6 +1795,7 @@ class NoteTextComponent extends React.Component {
|
|||||||
accuracy: 'partially',
|
accuracy: 'partially',
|
||||||
}]
|
}]
|
||||||
markerOptions.selectedIndex = this.state.localSearch.selectedIndex;
|
markerOptions.selectedIndex = this.state.localSearch.selectedIndex;
|
||||||
|
markerOptions.separateWordSearch = false;
|
||||||
} else {
|
} else {
|
||||||
const search = BaseModel.byId(this.props.searches, this.props.selectedSearchId);
|
const search = BaseModel.byId(this.props.searches, this.props.selectedSearchId);
|
||||||
if (search) {
|
if (search) {
|
||||||
|
@ -205,15 +205,19 @@
|
|||||||
elementIndex++;
|
elementIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const markKeywordOptions = {
|
||||||
|
each: onEachElement,
|
||||||
|
};
|
||||||
|
|
||||||
|
if ('separateWordSearch' in options) markKeywordOptions.separateWordSearch = options.separateWordSearch;
|
||||||
|
|
||||||
for (let i = 0; i < keywords.length; i++) {
|
for (let i = 0; i < keywords.length; i++) {
|
||||||
let keyword = keywords[i];
|
let keyword = keywords[i];
|
||||||
|
|
||||||
markJsUtils.markKeyword(mark_, keyword, {
|
markJsUtils.markKeyword(mark_, keyword, {
|
||||||
pregQuote: pregQuote,
|
pregQuote: pregQuote,
|
||||||
replaceRegexDiacritics: replaceRegexDiacritics,
|
replaceRegexDiacritics: replaceRegexDiacritics,
|
||||||
}, {
|
}, markKeywordOptions);
|
||||||
each: onEachElement,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcProxySendToHost('setMarkerCount', elementIndex);
|
ipcProxySendToHost('setMarkerCount', elementIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user