Skip to content

Commit f71a678

Browse files
committed
Exclude the current file from the list of referencing files used for context
1 parent 612cb64 commit f71a678

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/editor/src/commands/check-referencing-files-for-context-command.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ export const check_referencing_files_for_context_command = (
3232

3333
if (!locations) return []
3434

35+
const current_file_path = document.uri.fsPath
3536
const file_map = new Map<string, vscode.Range>()
3637
locations.forEach((loc) => {
3738
const file_path = loc.uri.fsPath
39+
40+
if (file_path == current_file_path) return
41+
3842
if (
3943
workspace_provider.get_workspace_root_for_file(file_path) &&
4044
!workspace_provider.is_ignored_by_patterns(file_path)

0 commit comments

Comments
 (0)