Skip to content

Commit 9209e75

Browse files
committed
Update the "Open parent file" command to show a message if no parent file is found
1 parent 8f55f94 commit 9209e75

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## [0.76.0]
44

5-
* Improve the "Wrap file contents as an object" refactoring to insert the object opening directive after any comments at the beginning of the file
5+
* Update the "Wrap file contents as an object" refactoring to insert the object opening directive after any comments at the beginning of the file
6+
* Update the "Open parent file" command to show a message if no parent file is found
67

78
## [0.75.0]
89

src/features/terminal.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,10 @@ export default class LogtalkTerminal {
15631563
const result = path.join(wdir, ".vscode_find_parent");
15641564
let loader = fs.readFileSync(result).toString();
15651565
await fsp.rm(result, { force: true });
1566+
if (loader.trim() === '') {
1567+
window.showInformationMessage("No parent file found for the current file.");
1568+
return;
1569+
}
15661570
workspace.openTextDocument(loader).then(doc => {
15671571
vscode.window.showTextDocument(doc);
15681572
});

0 commit comments

Comments
 (0)