Skip to content

Commit

Permalink
fix: use short path name in statusbar message. (#1485)
Browse files Browse the repository at this point in the history
* fix: use short path name in statusbar message.

* Update cSpell.json
  • Loading branch information
Jason3S authored Oct 29, 2021
1 parent 5839ea8 commit 6edabe7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"packages/client/samples/**",
"packages/client/server/**",
"packages/client/settingsViewer/**",
"samples",
"/samples",
"testFixtures"
],
"ignoreWords": [],
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/statusbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { workspace, ExtensionContext, window, TextEditor } from 'vscode';
import * as vscode from 'vscode';
import { CSpellClient, ServerResponseIsSpellCheckEnabledForFile } from './client';
import * as infoViewer from './infoViewer';
import { isSupportedUri, isSupportedDoc } from 'common-utils/uriHelper.js';
import { isSupportedUri, isSupportedDoc, uriToName } from 'common-utils/uriHelper.js';
import { sectionCSpell } from './settings';
import { getCSpellDiags } from './diags';

Expand Down Expand Up @@ -61,7 +61,7 @@ export function initStatusBar(context: ExtensionContext, client: CSpellClient):
}
const ex = response.excludedBy[0];
const { glob, name, id } = ex;
const configPath = ex.configUri && vscode.workspace.asRelativePath(ex.configUri);
const configPath = ex.configUri && uriToName(vscode.Uri.parse(ex.configUri));
return `File excluded by ${JSON.stringify(glob)} in ${configPath || id || name || 'settings'}`;
}

Expand Down

0 comments on commit 6edabe7

Please sign in to comment.