Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 49d29a8

Browse files
authored
Merge pull request #14423 from adobe/master
Merging commits from master which fix the blockers for 1.13
2 parents 8f04753 + 10b651b commit 49d29a8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/document/DocumentCommandHandlers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ define(function (require, exports, module) {
158158
var currentDoc = DocumentManager.getCurrentDocument(),
159159
windowTitle = brackets.config.app_title,
160160
currentlyViewedFile = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE),
161-
currentlyViewedPath = currentlyViewedFile.fullPath,
162-
readOnlyString = currentlyViewedFile.readOnly ? "[Read Only] - " : "";
161+
currentlyViewedPath = currentlyViewedFile && currentlyViewedFile.fullPath,
162+
readOnlyString = (currentlyViewedFile && currentlyViewedFile.readOnly) ? "[Read Only] - " : "";
163163

164164
if (!brackets.nativeMenus) {
165165
if (currentlyViewedPath) {

src/extensions/default/RemoteFileAdapter/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ define(function (require, exports, module) {
5959
function _setMenuItemsVisible() {
6060
var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE),
6161
cMenuItems = [Commands.FILE_SAVE, Commands.FILE_RENAME, Commands.NAVIGATE_SHOW_IN_FILE_TREE, Commands.NAVIGATE_SHOW_IN_OS],
62-
enable = (file.constructor.name !== "RemoteFile");
62+
// Enable menu options when no file is present in active pane
63+
enable = !file || (file.constructor.name !== "RemoteFile");
6364

6465
// Enable or disable commands based on whether the file is a remoteFile or not.
6566
cMenuItems.forEach(function (item) {

src/search/FindBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ define(function (require, exports, module) {
705705
*/
706706
FindBar.getInitialQuery = function (currentFindBar, editor) {
707707
var query,
708-
selection = FindBar._getInitialQueryFromSelection(editor),
708+
selection = editor ? FindBar._getInitialQueryFromSelection(editor) : "",
709709
replaceText = "";
710710

711711
if (currentFindBar && !currentFindBar.isClosed()) {

0 commit comments

Comments
 (0)