Skip to content

Commit 016f9ad

Browse files
author
Loïc Mangeonjean
committed
fix: use ICodeEditor instead of IStandaloneCodeEditor when possible
1 parent e69a529 commit 016f9ad

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/keybindings/vim.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ onConfigurationChanged(() => {
9292
}
9393
})
9494

95-
export function initVimMode (editor: monaco.editor.IStandaloneCodeEditor, statusBarElement: Element): IDisposable {
95+
export function initVimMode (editor: monaco.editor.ICodeEditor, statusBarElement: Element): IDisposable {
9696
return monacoVim.initVimMode(editor, statusBarElement)
9797
}

src/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export function hideCodeWithoutDecoration (editor: monaco.editor.IStandaloneCode
224224
/**
225225
* Collapse everything between startToken and endToken
226226
*/
227-
export async function collapseCodeSections (editor: monaco.editor.IStandaloneCodeEditor, startToken: string, endToken: string, isRegex: boolean = false): Promise<void> {
227+
export async function collapseCodeSections (editor: monaco.editor.ICodeEditor, startToken: string, endToken: string, isRegex: boolean = false): Promise<void> {
228228
const editorModel = editor.getModel()
229229
const ranges: monaco.IRange[] = []
230230
if (editorModel != null) {

src/tools/EditorOpenHandlerRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createEditor } from '../monaco'
55

66
let currentEditor: ({
77
model: monaco.editor.ITextModel
8-
editor: monaco.editor.IStandaloneCodeEditor
8+
editor: monaco.editor.ICodeEditor
99
} & monaco.IDisposable) | null = null
1010
function openNewCodeEditor (modelRef: IReference<IResolvedTextEditorModel>) {
1111
if (currentEditor != null && modelRef.object.textEditorModel === currentEditor.model) {

src/types/monaco-vim.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
declare module 'monaco-vim' {
22
import * as monaco from 'monaco-editor'
33
export const initVimMode: (
4-
editor: monaco.editor.IStandaloneCodeEditor,
4+
editor: monaco.editor.ICodeEditor,
55
statusBarElement: Element
66
) => monaco.IDisposable
77
export const VimMode: {

src/types/monaco.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IRange } from 'monaco-editor'
22

33
declare module 'monaco-editor' {
44
namespace editor {
5-
interface IStandaloneCodeEditor {
5+
interface ICodeEditor {
66
// This method is internal and is supposed to be used by the folding feature
77
// We still use it to hide parts of the code in the `hideCodeWithoutDecoration` function
88
setHiddenAreas(ranges: IRange[]): void

0 commit comments

Comments
 (0)