mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Make diff view left side readonly so users don't accidentally edit it
This commit is contained in:
@@ -94,7 +94,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
)
|
||||
|
||||
/*
|
||||
We use the text document content provider API to show an empty text doc for diff view for new files by creating a virtual document for the new content.
|
||||
We use the text document content provider API to show the left side for diff view by creating a virtual document for the original content. This makes it readonly so users know to edit the right side if they want to keep their changes.
|
||||
|
||||
- This API allows you to create readonly documents in VSCode from arbitrary sources, and works by claiming an uri-scheme for which your provider then returns text contents. The scheme must be provided when registering a provider and cannot change afterwards.
|
||||
- Note how the provider doesn't create uris for virtual documents - its role is to provide contents given such an uri. In return, content providers are wired into the open document logic so that providers are always considered.
|
||||
|
||||
Reference in New Issue
Block a user