Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit d2afcf8

Browse files
authored
sveltekit: Fix prototype due to external package changes (#57587)
Because the prototype (intentionally) isn't "verified" when changes to other packages are made, it's possible that it breaks when code in other packages changes. This commit brings the prototype up-to-date. The `singleLine` extension was recently refactored and the `applyOnEnter` option was removed.
1 parent ca0bdbc commit d2afcf8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

client/web-sveltekit/src/lib/branded.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ export {
44
basicSyntaxColumns,
55
exampleQueryColumns,
66
} from '@sourcegraph/branded/src/search-ui/components/QueryExamples.constants'
7-
export { createDefaultSuggestions, singleLine } from '@sourcegraph/branded/src/search-ui/input/codemirror'
7+
export { createDefaultSuggestions } from '@sourcegraph/branded/src/search-ui/input/codemirror'
8+
export { multiline } from '@sourcegraph/branded/src/search-ui/input/codemirror/multiline'
89
export { parseInputAsQuery } from '@sourcegraph/branded/src/search-ui/input/codemirror/parsedQuery'
910
export { querySyntaxHighlighting } from '@sourcegraph/branded/src/search-ui/input/codemirror/syntax-highlighting'
1011
export { decorateQuery } from '@sourcegraph/branded/src/search-ui/util/query'

client/web-sveltekit/src/lib/search/CodeMirrorQueryInput.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
import { browser } from '$app/environment'
99
import { goto } from '$app/navigation'
10-
import { createDefaultSuggestions, singleLine, parseInputAsQuery, querySyntaxHighlighting } from '$lib/branded'
10+
import { createDefaultSuggestions, multiline, parseInputAsQuery, querySyntaxHighlighting } from '$lib/branded'
1111
import type { SearchPatternType } from '$lib/graphql-operations'
1212
import { fetchStreamSuggestions, QueryChangeSource, type QueryState } from '$lib/shared'
1313
@@ -46,7 +46,6 @@
4646
fetchSuggestions: query => fetchStreamSuggestions(query),
4747
isSourcegraphDotCom: false,
4848
navigate: url => goto(url.toString()),
49-
applyOnEnter: true,
5049
}),
5150
]
5251
@@ -84,7 +83,7 @@
8483
},
8584
])
8685
),
87-
singleLine,
86+
multiline(false),
8887
EditorView.updateListener.of(update => {
8988
const { state } = update
9089
if (update.docChanged) {

0 commit comments

Comments
 (0)