Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions extensions/simple-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,9 @@
},
"simpleBrowser.useIntegratedBrowser": {
"type": "boolean",
"default": false,
"default": true,
"markdownDescription": "%configuration.useIntegratedBrowser.description%",
"scope": "application",
"tags": [
"experimental",
"onExP"
]
"scope": "application"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/simple-browser/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"displayName": "Simple Browser",
"description": "A very basic built-in webview for displaying web content.",
"configuration.focusLockIndicator.enabled.description": "Enable/disable the floating indicator that shows when focused in the simple browser.",
"configuration.useIntegratedBrowser.description": "When enabled, the `simpleBrowser.show` command will open URLs in the integrated browser instead of the Simple Browser webview. **Note:** This setting is experimental and only available on desktop."
"configuration.useIntegratedBrowser.description": "When enabled, the `simpleBrowser.show` command will open URLs in the integrated browser instead of the Simple Browser webview. **Note:** This setting is only available on desktop."
}
2 changes: 1 addition & 1 deletion extensions/simple-browser/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const openerId = 'simpleBrowser.open';
*/
async function shouldUseIntegratedBrowser(): Promise<boolean> {
const config = vscode.workspace.getConfiguration();
if (!config.get<boolean>(useIntegratedBrowserSetting, false)) {
if (!config.get<boolean>(useIntegratedBrowserSetting, true)) {
return false;
}

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"native-keymap": "^3.3.5",
"node-pty": "^1.2.0-beta.10",
"open": "^10.1.2",
"playwright-core": "^1.58.2",
"playwright-core": "1.59.0-alpha-2026-02-20",
"tas-client": "0.3.1",
"undici": "^7.18.2",
"v8-inspect-profiler": "^0.1.1",
Expand Down
33 changes: 32 additions & 1 deletion src/vs/editor/common/model/textModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { EditSources, TextModelEditSource } from '../textModelEditSource.js';
import { IModelContentChangedEvent, IModelDecorationsChangedEvent, IModelOptionsChangedEvent, InternalModelContentChangeEvent, LineInjectedText, ModelFontChanged, ModelFontChangedEvent, ModelInjectedTextChangedEvent, ModelLineHeightChanged, ModelLineHeightChangedEvent, ModelRawChange, ModelRawContentChangedEvent, ModelRawEOLChanged, ModelRawFlush, ModelRawLineChanged, ModelRawLinesDeleted, ModelRawLinesInserted } from '../textModelEvents.js';
import { IGuidesTextModelPart } from '../textModelGuides.js';
import { ITokenizationTextModelPart } from '../tokenizationTextModelPart.js';
import { TokenArray } from '../tokens/lineTokens.js';
import { LineTokens, TokenArray } from '../tokens/lineTokens.js';
import { BracketPairsTextModelPart } from './bracketPairsTextModelPart/bracketPairsImpl.js';
import { ColorizedBracketPairsDecorationProvider } from './bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js';
import { EditStack } from './editStack.js';
Expand Down Expand Up @@ -2161,6 +2161,37 @@ export class TextModel extends Disposable implements model.ITextModel, IDecorati
}
}

export function getLineTokensWithInjections(tokens: LineTokens, injectionOptions: model.InjectedTextOptions[] | null, injectionOffsets: number[] | null): LineTokens {
let lineTokens: LineTokens;
if (injectionOffsets) {
const tokensToInsert: { offset: number; text: string; tokenMetadata: number }[] = [];

for (let idx = 0; idx < injectionOffsets.length; idx++) {
const offset = injectionOffsets[idx];
const tokens = injectionOptions![idx].tokens;
if (tokens) {
tokens.forEach((range, info) => {
tokensToInsert.push({
offset,
text: range.substring(injectionOptions![idx].content),
tokenMetadata: info.metadata,
});
});
} else {
tokensToInsert.push({
offset,
text: injectionOptions![idx].content,
tokenMetadata: LineTokens.defaultTokenMetadata,
});
}
}
lineTokens = tokens.withInserted(tokensToInsert);
} else {
lineTokens = tokens;
}
return lineTokens;
}

export function indentOfLine(line: string): number {
let indent = 0;
for (const c of line) {
Expand Down
6 changes: 3 additions & 3 deletions src/vs/editor/common/viewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { BracketGuideOptions, IActiveIndentGuideInfo, IndentGuide } from './text
import { IViewLineTokens } from './tokens/lineTokens.js';
import { ViewEventHandler } from './viewEventHandler.js';
import { VerticalRevealType } from './viewEvents.js';
import { InlineDecoration, SingleLineInlineDecoration } from './viewModel/inlineDecorations.js';
import { InlineDecoration } from './viewModel/inlineDecorations.js';
import { EditorOption, FindComputedEditorOptionValueById } from './config/editorOptions.js';

export interface IViewModel extends ICursorSimpleModel, ISimpleModel {
Expand Down Expand Up @@ -278,7 +278,7 @@ export class ViewLineData {
/**
* Additional inline decorations for this line.
*/
public readonly inlineDecorations: readonly SingleLineInlineDecoration[] | null;
public readonly inlineDecorations: readonly InlineDecoration[] | null;

constructor(
content: string,
Expand All @@ -287,7 +287,7 @@ export class ViewLineData {
maxColumn: number,
startVisibleColumn: number,
tokens: IViewLineTokens,
inlineDecorations: readonly SingleLineInlineDecoration[] | null
inlineDecorations: readonly InlineDecoration[] | null
) {
this.content = content;
this.continuesWithWrappedLine = continuesWithWrappedLine;
Expand Down
Loading
Loading