File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import "./fill/storageDatabase";
55import "./fill/windowsService" ;
66import "./fill/environmentService" ;
77import "./fill/vscodeTextmate" ;
8+ import "./fill/codeEditor" ;
89import { PasteAction } from "./fill/paste" ;
910import "./fill/dom" ;
1011import "./vscode.scss" ;
Original file line number Diff line number Diff line change 1+ import { join } from "path" ;
2+ import * as editor from "vs/editor/browser/services/codeEditorServiceImpl" ;
3+ import { IDecorationRenderOptions } from "vs/editor/common/editorCommon" ;
4+
5+ /**
6+ * This converts icon paths for decorations to the correct URL.
7+ */
8+ abstract class CodeEditorServiceImpl extends editor . CodeEditorServiceImpl {
9+
10+ public registerDecorationType ( key : string , options : IDecorationRenderOptions , parentTypeKey ?: string ) : void {
11+ super . registerDecorationType ( key , options ? {
12+ ...options ,
13+ gutterIconPath : options . gutterIconPath && options . gutterIconPath . scheme === "file" ? {
14+ ...options . gutterIconPath ,
15+ scheme : location . protocol . replace ( ":" , "" ) ,
16+ authority : location . host ,
17+ path : join ( "/resource" , options . gutterIconPath . path ) ,
18+ } :options . gutterIconPath ,
19+ } : { } , parentTypeKey ) ;
20+ }
21+
22+ }
23+
24+ const target = editor as typeof editor ;
25+ target . CodeEditorServiceImpl = CodeEditorServiceImpl ;
You can’t perform that action at this time.
0 commit comments