You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by da...@apache.org on 2023/03/22 19:44:27 UTC

[daffodil-vscode] branch main updated: Tab name is basename of filepath of file edited (fixes #507)

This is an automated email from the ASF dual-hosted git repository.

davin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git


The following commit(s) were added to refs/heads/main by this push:
     new 07638fd  Tab name is basename of filepath of file edited (fixes #507)
07638fd is described below

commit 07638fdb5f8d1d3a7526c8b04c3287514de9445c
Author: Davin Shearer <22...@users.noreply.github.com>
AuthorDate: Wed Mar 22 08:26:34 2023 -0400

    Tab name is basename of filepath of file edited (fixes #507)
---
 src/omega_edit/dataEditWebView.ts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/omega_edit/dataEditWebView.ts b/src/omega_edit/dataEditWebView.ts
index b99e1ba..b638568 100644
--- a/src/omega_edit/dataEditWebView.ts
+++ b/src/omega_edit/dataEditWebView.ts
@@ -34,6 +34,7 @@ import {
   setViewportDataForPanel,
   viewportSubscribe,
 } from './utils'
+import path from 'path'
 
 const VIEWPORT_CAPACITY_MAX = 1000000 // Maximum viewport size in Ωedit is 1048576 (1024 * 1024)
 const HEARTBEAT_INTERVAL_MS = 1000 // 1 second (1000 ms)
@@ -96,6 +97,7 @@ export class DataEditWebView implements vscode.Disposable {
         .then(async (fileUri) => {
           if (fileUri && fileUri[0]) {
             this.fileToEdit = fileUri[0].fsPath
+            this.panel.title = path.basename(this.fileToEdit)
             await this.setupDataEditor()
           }
         })