@@ -8212,6 +8212,7 @@ define("command/Commands", function (require, exports, module) {
82128212 exports.FILE_CLOSE = "file.close"; // DocumentCommandHandlers.js handleFileClose()
82138213 exports.FILE_CLOSE_ALL = "file.close_all"; // DocumentCommandHandlers.js handleFileCloseAll()
82148214 exports.FILE_CLOSE_LIST = "file.close_list"; // DocumentCommandHandlers.js handleFileCloseList()
8215+ exports.FILE_REOPEN_CLOSED = "file.reopen_closed"; // DocumentCommandHandlers.js handleReopenClosed()
82158216 exports.FILE_OPEN_DROPPED_FILES = "file.openDroppedFiles"; // DragAndDrop.js openDroppedFiles()
82168217 exports.FILE_LIVE_FILE_PREVIEW = "file.liveFilePreview"; // LiveDevelopment/main.js _handleGoLiveCommand()
82178218 exports.FILE_LIVE_FILE_PREVIEW_SETTINGS = "file.liveFilePreviewSettings"; // LiveDevelopment/main.js _handleGoLiveCommand()
@@ -8286,6 +8287,7 @@ define("command/Commands", function (require, exports, module) {
82868287 exports.VIEW_SCROLL_LINE_UP = "view.scrollLineUp"; // ViewCommandHandlers.js _handleScrollLineUp()
82878288 exports.VIEW_SCROLL_LINE_DOWN = "view.scrollLineDown"; // ViewCommandHandlers.js _handleScrollLineDown()
82888289 exports.VIEW_TOGGLE_INSPECTION = "view.toggleCodeInspection"; // CodeInspection.js toggleEnabled()
8290+ exports.VIEW_TOGGLE_PROBLEMS = "view.toggleProblems"; // CodeInspection.js toggleProblems()
82898291 exports.TOGGLE_LINE_NUMBERS = "view.toggleLineNumbers"; // EditorOptionHandlers.js _getToggler()
82908292 exports.TOGGLE_ACTIVE_LINE = "view.toggleActiveLine"; // EditorOptionHandlers.js _getToggler()
82918293 exports.TOGGLE_WORD_WRAP = "view.toggleWordWrap"; // EditorOptionHandlers.js _getToggler()
@@ -8444,6 +8446,9 @@ define("command/DefaultMenus", function (require, exports, module) {
84448446 const fileCloseAllShortcut = isDesktop ? "Ctrl-Shift-W" : ""; // Ctrl-Alt-Shift-W` universal shortcut is set in keyboard.json
84458447 const openFileShortcut = isDesktop ? "Ctrl-O" : "";
84468448 const openFolderShortcut = isBrowser ? "Ctrl-O" : "";
8449+ const reopenClosedShortcut = isBrowser ? "" : "Ctrl-Shift-T";
8450+ const nextDocShortcut = isBrowser ? "Alt-PageDown" : "Ctrl-PageDown";
8451+ const prevDocShortcut = isBrowser ? "Alt-PageUp" : "Ctrl-PageUp";
84478452
84488453 AppInit.htmlReady(function () {
84498454 /**
@@ -8488,6 +8493,7 @@ define("command/DefaultMenus", function (require, exports, module) {
84888493 menu.addMenuItem(Commands.FILE_OPEN_FOLDER, openFolderShortcut);
84898494 menu.addMenuItem(Commands.FILE_CLOSE, fileCloseShortcut);
84908495 menu.addMenuItem(Commands.FILE_CLOSE_ALL, fileCloseAllShortcut);
8496+ menu.addMenuItem(Commands.FILE_REOPEN_CLOSED, reopenClosedShortcut);
84918497 menu.addMenuDivider();
84928498 menu.addMenuItem(Commands.FILE_SAVE);
84938499 menu.addMenuItem(Commands.FILE_SAVE_ALL);
@@ -8588,6 +8594,7 @@ define("command/DefaultMenus", function (require, exports, module) {
85888594 menu.addMenuDivider();
85898595 menu.addMenuItem(Commands.FILE_LIVE_HIGHLIGHT);
85908596 menu.addMenuDivider();
8597+ menu.addMenuItem(Commands.VIEW_TOGGLE_PROBLEMS);
85918598 menu.addMenuItem(Commands.VIEW_TOGGLE_INSPECTION);
85928599
85938600 /*
@@ -8603,8 +8610,8 @@ define("command/DefaultMenus", function (require, exports, module) {
86038610 menu.addMenuDivider();
86048611 menu.addMenuItem(Commands.NAVIGATE_NEXT_DOC);
86058612 menu.addMenuItem(Commands.NAVIGATE_PREV_DOC);
8606- menu.addMenuItem(Commands.NAVIGATE_NEXT_DOC_LIST_ORDER);
8607- menu.addMenuItem(Commands.NAVIGATE_PREV_DOC_LIST_ORDER);
8613+ menu.addMenuItem(Commands.NAVIGATE_NEXT_DOC_LIST_ORDER, nextDocShortcut );
8614+ menu.addMenuItem(Commands.NAVIGATE_PREV_DOC_LIST_ORDER, prevDocShortcut );
86088615 menu.addMenuDivider();
86098616 menu.addMenuItem(Commands.NAVIGATE_SHOW_IN_FILE_TREE);
86108617 menu.addMenuDivider();
@@ -11803,7 +11810,9 @@ define("command/Menus", function (require, exports, module) {
1180311810 $menuItem.on("mouseenter", function () {
1180411811 // This is to prevent size jumps when the keyboard
1180511812 // icon hides and shows as selection changes
11813+ $menuAnchor.addClass("use-invisible-for-width-compute");
1180611814 const currentWidth = $(this).width(); // Get the current width
11815+ $menuAnchor.removeClass("use-invisible-for-width-compute");
1180711816 $(this).css('min-width', currentWidth + 'px');
1180811817 self.closeSubMenu();
1180911818 // now show selection
@@ -11971,10 +11980,13 @@ define("command/Menus", function (require, exports, module) {
1197111980 "<span class='right-pusher'></span>" +
1197211981 "<span>▸</span>" +
1197311982 "</a></li>");
11983+ const $menuAnchor = $menuItem.find(".menuAnchor");
1197411984
1197511985 let self = this;
1197611986 $menuItem.on("mouseenter", function(e) {
11987+ $menuAnchor.addClass("use-invisible-for-width-compute");
1197711988 const currentWidth = $(this).width(); // Get the current width
11989+ $menuAnchor.removeClass("use-invisible-for-width-compute");
1197811990 $(this).css('min-width', currentWidth + 'px'); // Set min-width to the current width
1197911991 if (self.openSubMenu && self.openSubMenu.id === menu.id) {
1198011992 return;
@@ -15093,6 +15105,39 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1509315105 return saveAll();
1509415106 }
1509515107
15108+ let closedFilesHistory = new Map();
15109+
15110+ function _enableOrDisableReopenClosedCmd() {
15111+ CommandManager.get(Commands.FILE_REOPEN_CLOSED).setEnabled(!!closedFilesHistory.size);
15112+ }
15113+
15114+ function _addToClosedFilesHistory(filePath, paneID) {
15115+ closedFilesHistory.set(filePath, {paneID, closeTime: Date.now()});
15116+ _enableOrDisableReopenClosedCmd();
15117+ }
15118+
15119+ function handleReopenClosed() {
15120+ // find the file that was most recently closed
15121+ let leastRecentlyClosedPath, leastRecentlyClosedTime, paneToUse;
15122+ for(let closedFilePath of closedFilesHistory.keys()){
15123+ const currentScan = closedFilesHistory.get(closedFilePath);
15124+ if(!leastRecentlyClosedPath || leastRecentlyClosedTime < currentScan.closeTime) {
15125+ leastRecentlyClosedPath = closedFilePath;
15126+ leastRecentlyClosedTime = currentScan.closeTime;
15127+ paneToUse = currentScan.paneID;
15128+ }
15129+ }
15130+ if(leastRecentlyClosedPath) {
15131+ closedFilesHistory.delete(leastRecentlyClosedPath);
15132+ if(MainViewManager.getPaneCount() === 1) {
15133+ paneToUse = MainViewManager.ACTIVE_PANE;
15134+ }
15135+ _enableOrDisableReopenClosedCmd();
15136+ return FileViewController.openFileAndAddToWorkingSet(leastRecentlyClosedPath, paneToUse);
15137+ }
15138+ _enableOrDisableReopenClosedCmd();
15139+ }
15140+
1509615141 /**
1509715142 * Closes the specified file: removes it from the workingset, and closes the main editor if one
1509815143 * is open. Prompts user about saving changes first, if document is dirty.
@@ -15112,7 +15157,8 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1511215157 promptOnly,
1511315158 _forceClose,
1511415159 _spawnedRequest,
15115- paneId = MainViewManager.ACTIVE_PANE;
15160+ paneId = MainViewManager.ACTIVE_PANE,
15161+ activePaneID = MainViewManager.getActivePaneId();
1511615162
1511715163 if (commandData) {
1511815164 file = commandData.file;
@@ -15126,6 +15172,11 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1512615172 function doClose(file) {
1512715173 if (!promptOnly) {
1512815174 MainViewManager._close(paneId, file);
15175+ let paneClosing = paneId;
15176+ if(paneId === MainViewManager.ACTIVE_PANE){
15177+ paneClosing = activePaneID;
15178+ }
15179+ _addToClosedFilesHistory(file.fullPath, paneClosing);
1512915180 _fileClosed(file);
1513015181 }
1513115182 }
@@ -15965,6 +16016,8 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1596516016
1596616017 let firstProjectOpenHandled = false;
1596716018 ProjectManager.on(ProjectManager.EVENT_AFTER_PROJECT_OPEN, ()=>{
16019+ closedFilesHistory = new Map();
16020+ _enableOrDisableReopenClosedCmd();
1596816021 if(firstProjectOpenHandled){
1596916022 return;
1597016023 }
@@ -16025,6 +16078,7 @@ define("document/DocumentCommandHandlers", function (require, exports, module) {
1602516078 CommandManager.register(Strings.CMD_FILE_CLOSE, Commands.FILE_CLOSE, handleFileClose);
1602616079 CommandManager.register(Strings.CMD_FILE_CLOSE_ALL, Commands.FILE_CLOSE_ALL, handleFileCloseAll);
1602716080 CommandManager.register(Strings.CMD_FILE_CLOSE_LIST, Commands.FILE_CLOSE_LIST, handleFileCloseList);
16081+ CommandManager.register(Strings.CMD_REOPEN_CLOSED, Commands.FILE_REOPEN_CLOSED, handleReopenClosed);
1602816082
1602916083 // Traversal
1603016084 CommandManager.register(Strings.CMD_NEXT_DOC, Commands.NAVIGATE_NEXT_DOC, handleGoNextDoc);
@@ -31812,7 +31866,7 @@ define("extensionsIntegrated/DisplayShortcuts/main", function (require, exports,
3181231866 <a href="#" class="close">×</a>
3181331867 <button class="btn reset-to-default" title="{{KEYBOARD_SHORTCUT_PANEL_RESET_DEFAULT}}">{{{KEYBOARD_SHORTCUT_PANEL_RESET}}}</button>
3181431868 <input class="filter" type="search" placeholder="{{{KEYBOARD_SHORTCUT_PANEL_FILTER}}}">
31815- <span class="presetPickerContainer forced-hidden " title="{{KEYBOARD_SHORTCUT_PRESET_TOOLTIP}}"></span>
31869+ <span class="presetPickerContainer" title="{{KEYBOARD_SHORTCUT_PRESET_TOOLTIP}}"></span>
3181631870 </div>
3181731871 <div class="resizable-content"></div>
3181831872</div>
@@ -34675,7 +34729,8 @@ define("extensionsIntegrated/NavigationAndHistory/main", function (require, expo
3467534729
3467634730 if (!CommandManager.get(SHOW_RECENT_FILES)) {
3467734731 CommandManager.register(Strings.CMD_RECENT_FILES_OPEN, SHOW_RECENT_FILES, _showRecentFileList);
34678- KeyBindingManager.addBinding(SHOW_RECENT_FILES, KeyboardPrefs[SHOW_RECENT_FILES]);
34732+ KeyBindingManager.addBinding(SHOW_RECENT_FILES,
34733+ Phoenix.isNativeApp ? "Ctrl-R" : "Ctrl-Alt-Shift-O");
3467934734 }
3468034735
3468134736 // Keyboard only - Navigate to the next doc in MROF list
@@ -34691,7 +34746,7 @@ define("extensionsIntegrated/NavigationAndHistory/main", function (require, expo
3469134746 KeyBindingManager.addBinding(PREV_IN_RECENT_FILES, KeyboardPrefs[PREV_IN_RECENT_FILES]);
3469234747
3469334748 var menu = Menus.getMenu(Menus.AppMenuBar.FILE_MENU);
34694- menu.addMenuItem(SHOW_RECENT_FILES, "", Menus.AFTER, Commands.FILE_OPEN_FOLDER );
34749+ menu.addMenuItem(SHOW_RECENT_FILES, "", Menus.AFTER, Commands.FILE_REOPEN_CLOSED );
3469534750 }
3469634751
3469734752 function _initDefaultNavigationCommands() {
@@ -52785,6 +52840,7 @@ define("language/CodeInspection", function (require, exports, module) {
5278552840 }
5278652841 toggleCollapsed(false);
5278752842 scrollToProblem(pos.line);
52843+ // todo strobe effect
5278852844 });
5278952845 $problemView.find(".copy-qv-error-text-btn").click(function (evt) {
5279052846 evt.preventDefault();
@@ -53215,6 +53271,10 @@ define("language/CodeInspection", function (require, exports, module) {
5321553271 run();
5321653272 }
5321753273
53274+ function toggleProblems() {
53275+ toggleCollapsed();
53276+ }
53277+
5321853278 let lastRunTime;
5321953279 $(window.document).on("mousemove", ()=>{
5322053280 if(Phoenix.isTestWindow){
@@ -53275,6 +53335,7 @@ define("language/CodeInspection", function (require, exports, module) {
5327553335
5327653336 // Register command handlers
5327753337 CommandManager.register(Strings.CMD_VIEW_TOGGLE_INSPECTION, Commands.VIEW_TOGGLE_INSPECTION, toggleEnabled);
53338+ CommandManager.register(Strings.CMD_VIEW_TOGGLE_PROBLEMS, Commands.VIEW_TOGGLE_PROBLEMS, toggleProblems);
5327853339 CommandManager.register(Strings.CMD_GOTO_FIRST_PROBLEM, Commands.NAVIGATE_GOTO_FIRST_PROBLEM, handleGotoFirstProblem);
5327953340
5328053341 // Register preferences
@@ -88579,6 +88640,7 @@ define("nls/root/strings", {
8857988640 "CMD_OPEN_FOLDER": "Open Folder\u2026",
8858088641 "CMD_FILE_CLOSE": "Close",
8858188642 "CMD_FILE_CLOSE_ALL": "Close All",
88643+ "CMD_REOPEN_CLOSED": "Reopen Closed File",
8858288644 "CMD_FILE_CLOSE_LIST": "Close List",
8858388645 "CMD_FILE_CLOSE_OTHERS": "Close Others",
8858488646 "CMD_FILE_CLOSE_ABOVE": "Close Others Above",
@@ -88664,6 +88726,7 @@ define("nls/root/strings", {
8866488726 "CMD_TOGGLE_WORD_WRAP": "Word Wrap",
8866588727 "CMD_LIVE_HIGHLIGHT": "Live Preview Highlight",
8866688728 "CMD_VIEW_TOGGLE_INSPECTION": "Lint Files on Save",
88729+ "CMD_VIEW_TOGGLE_PROBLEMS": "Problems",
8866788730 "CMD_WORKINGSET_SORT_BY_ADDED": "Sort by Added",
8866888731 "CMD_WORKINGSET_SORT_BY_NAME": "Sort by Name",
8866988732 "CMD_WORKINGSET_SORT_BY_TYPE": "Sort by Type",
0 commit comments