Fix: libs/remix-ui/search/src/lib/context/context.tsx

pull/5646/head^2
dxsullivan 3 weeks ago committed by Aniket
parent c6a5af31c9
commit c25d7a706b
  1. 4
      libs/remix-ui/search/src/lib/context/context.tsx

@ -19,7 +19,7 @@ export interface SearchingStateInterface {
setWholeWord: (value: boolean) => void setWholeWord: (value: boolean) => void
setSearchResults: (value: SearchResult[]) => void setSearchResults: (value: SearchResult[]) => void
findText: (path: string) => Promise<SearchResultLine[]> findText: (path: string) => Promise<SearchResultLine[]>
hightLightInPath: (result: SearchResult, line: SearchResultLineLine) => void highlightInPath: (result: SearchResult, line: SearchResultLineLine) => void
replaceText: (result: SearchResult, line: SearchResultLineLine) => Promise<void> replaceText: (result: SearchResult, line: SearchResultLineLine) => Promise<void>
reloadFile: (file: string) => void reloadFile: (file: string) => void
toggleCaseSensitive: () => void toggleCaseSensitive: () => void
@ -194,7 +194,7 @@ export const SearchProvider = ({ children = [], reducer = SearchReducer, initial
// do nothing // do nothing
} }
}, },
hightLightInPath: async (result: SearchResult, line: SearchResultLineLine) => { highlightInPath: async (result: SearchResult, line: SearchResultLineLine) => {
await plugin.call('editor', 'discardHighlight') await plugin.call('editor', 'discardHighlight')
await plugin.call('editor', 'highlight', line.position, result.path) await plugin.call('editor', 'highlight', line.position, result.path)
await plugin.call('editor', 'revealRange', line.position.start.line, line.position.start.column, line.position.end.line, line.position.end.column) await plugin.call('editor', 'revealRange', line.position.start.line, line.position.start.column, line.position.end.line, line.position.end.column)

Loading…
Cancel
Save