Skip to content

Commit 3d3bdb5

Browse files
committed
refactor: rename close unmodified tabs to close saved tabs for better readability
1 parent e461c70 commit 3d3bdb5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/extensionsIntegrated/TabBar/more-options.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ define(function (require, exports, module) {
3737
Strings.CLOSE_TAB,
3838
Strings.CLOSE_TABS_TO_THE_LEFT,
3939
Strings.CLOSE_TABS_TO_THE_RIGHT,
40+
Strings.CLOSE_SAVED_TABS,
4041
Strings.CLOSE_ALL_TABS,
41-
Strings.CLOSE_UNMODIFIED_TABS,
4242
"---",
4343
Strings.CMD_FILE_RENAME,
4444
Strings.CMD_FILE_DELETE,
@@ -89,12 +89,12 @@ define(function (require, exports, module) {
8989
}
9090

9191
/**
92-
* "CLOSE UNMODIFIED TABS"
93-
* This will close all tabs that are not modified in the specified pane
92+
* "CLOSE SAVED TABS"
93+
* This will close all tabs that are not dirty in the specified pane
9494
*
9595
* @param {String} paneId - the id of the pane ["first-pane", "second-pane"]
9696
*/
97-
function handleCloseUnmodifiedTabs(paneId) {
97+
function handleCloseSavedTabs(paneId) {
9898
if (!paneId) {
9999
return;
100100
}
@@ -108,7 +108,7 @@ define(function (require, exports, module) {
108108
// get all those entries that are not dirty
109109
const unmodifiedEntries = workingSet.filter((entry) => !entry.isDirty);
110110

111-
// close each unmodified file in the pane
111+
// close each non-dirty file in the pane
112112
for (let i = unmodifiedEntries.length - 1; i >= 0; i--) {
113113
const fileObj = FileSystem.getFileForPath(unmodifiedEntries[i].path);
114114
CommandManager.execute(Commands.FILE_CLOSE, { file: fileObj, paneId: paneId });
@@ -306,8 +306,8 @@ define(function (require, exports, module) {
306306
case Strings.CLOSE_ALL_TABS:
307307
handleCloseAllTabs(paneId);
308308
break;
309-
case Strings.CLOSE_UNMODIFIED_TABS:
310-
handleCloseUnmodifiedTabs(paneId);
309+
case Strings.CLOSE_SAVED_TABS:
310+
handleCloseSavedTabs(paneId);
311311
break;
312312
case Strings.CMD_FILE_RENAME:
313313
handleFileRename(filePath);

src/nls/root/strings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ define({
434434
"CLOSE_TABS_TO_THE_RIGHT": "Close Tabs to the Right",
435435
"CLOSE_TABS_TO_THE_LEFT": "Close Tabs to the Left",
436436
"CLOSE_ALL_TABS": "Close All Tabs",
437-
"CLOSE_UNMODIFIED_TABS": "Close Unmodified Tabs",
437+
"CLOSE_SAVED_TABS": "Close Saved Tabs",
438438
"REOPEN_CLOSED_FILE": "Reopen Closed File",
439439

440440
// CodeInspection: errors/warnings

0 commit comments

Comments
 (0)