From 739918647d63cdeea15f7d124e7f607890b46acd Mon Sep 17 00:00:00 2001 From: Vaclav Barta Date: Thu, 20 Jan 2022 10:37:24 +0100 Subject: [PATCH] fixed tail match --- state/actions/saveFile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/state/actions/saveFile.ts b/state/actions/saveFile.ts index 70b7ad9..1b5bc70 100644 --- a/state/actions/saveFile.ts +++ b/state/actions/saveFile.ts @@ -4,7 +4,7 @@ import state from '../index'; // Saves the current editor content to global state export const saveFile = (showToast: boolean = true) => { const editorModels = state.editorCtx?.getModels(); - const sought = state.files[state.active].name; + const sought = '/' + state.files[state.active].name; const currentModel = editorModels?.find((editorModel) => { return editorModel.uri.path.endsWith(sought); });