Skip to content

Commit fe39b27

Browse files
fix: fix
1 parent d02d4cc commit fe39b27

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/extension/preview.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ async function onReplaceAll(payload: ChildToParent['replaceAll']) {
199199
if (confirmed !== 'Replace') {
200200
return
201201
}
202-
const { id, pattern, rewrite, selector, strictness } = payload
202+
const { id, pattern, rewrite, selector, strictness, lang } = payload
203203
for (const change of payload.changes) {
204204
// TODO: chunk change
205205
await onCommitChange({
@@ -208,13 +208,14 @@ async function onReplaceAll(payload: ChildToParent['replaceAll']) {
208208
rewrite,
209209
selector,
210210
strictness,
211+
lang,
211212
...change,
212213
})
213214
}
214215
}
215216

216217
async function onCommitChange(payload: ChildToParent['commitChange']) {
217-
const { filePath, pattern, rewrite, strictness, selector } = payload
218+
const { filePath, pattern, rewrite, strictness, selector, lang } = payload
218219
const fileUri = workspaceUriFromFilePath(filePath)
219220
if (!fileUri) {
220221
return
@@ -225,6 +226,7 @@ async function onCommitChange(payload: ChildToParent['commitChange']) {
225226
rewrite,
226227
strictness,
227228
selector,
229+
lang,
228230
includeFile: filePath,
229231
})
230232
}

src/webview/hooks/useSearch.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ let queryInFlight: SearchQuery = {
2525
rewrite: '',
2626
strictness: 'smart',
2727
selector: '',
28+
lang: '',
2829
}
2930
let searching = true
3031
let searchError: Error | null = null

0 commit comments

Comments
 (0)