diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts index 36a7e3037d2..cb5f5c99735 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts @@ -308,7 +308,7 @@ export const getOrMakeSearchEditorInput = ( let config = { ...defaultConfig, ...priorConfig, ...existingData.config }; if (defaultNumberOfContextLines !== null && defaultNumberOfContextLines !== undefined) { - config.contextLines = defaultNumberOfContextLines; + config.contextLines = existingData.config.contextLines ?? defaultNumberOfContextLines; } if (existingData.text) {