diff --git a/src/vs/platform/void/common/refreshModelService.ts b/src/vs/platform/void/common/refreshModelService.ts index 5a60fffd..ea53537c 100644 --- a/src/vs/platform/void/common/refreshModelService.ts +++ b/src/vs/platform/void/common/refreshModelService.ts @@ -138,7 +138,7 @@ export class RefreshModelService extends Disposable implements IRefreshModelServ const { isPolling, isInvisible } = options ?? {} - console.log(`refreshModels, isInvisible ${isInvisible} isPolling ${isPolling}`) + // console.log(`refreshModels, isInvisible ${isInvisible} isPolling ${isPolling}`) this._clearProviderTimeout(providerName) diff --git a/src/vs/workbench/contrib/void/browser/helperServices/consistentItemService.ts b/src/vs/workbench/contrib/void/browser/helperServices/consistentItemService.ts index f2b44d60..8bde2321 100644 --- a/src/vs/workbench/contrib/void/browser/helperServices/consistentItemService.ts +++ b/src/vs/workbench/contrib/void/browser/helperServices/consistentItemService.ts @@ -80,6 +80,7 @@ export class ConsistentItemService extends Disposable { } const initializeEditor = (editor: ICodeEditor) => { + if (editor.getModel()?.uri.scheme !== 'file') return addTabSwitchListeners(editor) addDisposeListener(editor) putItemsOnEditor(editor, editor.getModel()?.uri ?? null) diff --git a/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts b/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts index cda92070..bc8a47fa 100644 --- a/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts +++ b/src/vs/workbench/contrib/void/browser/inlineDiffsService.ts @@ -372,13 +372,11 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { const buttonsWidget = new AcceptAllRejectAllWidget({ editor, onAcceptAll: () => { - console.log('ACCEPTING ALL') - this.removeDiffAreas({ uri, behavior: 'accept' }) + this.removeDiffAreas({ uri, behavior: 'accept', removeCtrlKs: false }) this._metricsService.capture('Accept All', {}) }, onRejectAll: () => { - console.log('RE ALL') - this.removeDiffAreas({ uri, behavior: 'reject' }) + this.removeDiffAreas({ uri, behavior: 'reject', removeCtrlKs: false }) this._metricsService.capture('Reject All', {}) }, }) @@ -1166,8 +1164,8 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { if (!uri_) return uri = uri_ - // reject all diffareas on this URI, adding to history (there can't possibly be overlap after this) - this.removeDiffAreas({ uri, behavior: 'reject' }) + // reject all diffZones on this URI, adding to history (there can't possibly be overlap after this) + this.removeDiffAreas({ uri, behavior: 'reject', removeCtrlKs: true }) // in ctrl+L the start and end lines are the full document const numLines = this._getNumLines(uri) @@ -1396,7 +1394,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { // remove a batch of diffareas all at once (and handle accept/reject of their diffs) - public removeDiffAreas({ uri, behavior }: { uri: URI, behavior: 'reject' | 'accept' }) { + public removeDiffAreas({ uri, removeCtrlKs, behavior }: { uri: URI, removeCtrlKs: boolean, behavior: 'reject' | 'accept' }) { const diffareaids = this.diffAreasOfURI[uri.fsPath] if (diffareaids.size === 0) return // do nothing @@ -1411,7 +1409,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService { if (behavior === 'reject') this._revertAndDeleteDiffZone(diffArea) else if (behavior === 'accept') this._deleteDiffZone(diffArea) } - else if (diffArea.type === 'CtrlKZone') { + else if (diffArea.type === 'CtrlKZone' && removeCtrlKs) { this._deleteCtrlKZone(diffArea) } } diff --git a/src/vs/workbench/contrib/void/browser/sidebarActions.ts b/src/vs/workbench/contrib/void/browser/sidebarActions.ts index 843f512d..fe9188c5 100644 --- a/src/vs/workbench/contrib/void/browser/sidebarActions.ts +++ b/src/vs/workbench/contrib/void/browser/sidebarActions.ts @@ -241,9 +241,8 @@ export class TabSwitchListener extends Disposable { // when editor switches tabs (models) const addTabSwitchListeners = (editor: ICodeEditor) => { this._register(editor.onDidChangeModel(e => { - if (e.newModelUrl && e.newModelUrl.scheme === 'file') { - onSwitchTab(e.newModelUrl) - } + if (e.newModelUrl?.scheme !== 'file') return + onSwitchTab(e.newModelUrl) })) }