Skip to content

Commit de96209

Browse files
authored
File tabs: only have the file name in the tab on Windows.
2 parents cc40a3a + c56c877 commit de96209

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderer/src/components/ContentsComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function addFile(file: locAPI.File): void {
104104
105105
fileTabs.value.splice(fileTabs.value.findIndex((fileTab) => fileTab.value === activeFile.value) + 1, 0, {
106106
value: filePath,
107-
title: filePath.split('/').pop() ?? '',
107+
title: filePath.split(/(\\|\/)/g).pop() ?? '',
108108
type: file.type(),
109109
uint8Array: topContents(String(fileContents)),
110110
base64: topContents(btoa(fileContents.reduce((data, byte) => data + String.fromCharCode(byte), ''))),

0 commit comments

Comments
 (0)