diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 71ad5498b..a7a9a14aa 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -154,6 +154,7 @@ class Editor extends View 'editor:toggle-line-comments': @toggleLineCommentsInSelection 'editor:log-cursor-scope': @logCursorScope 'editor:checkout-head-revision': @checkoutHead + 'editor:toggle-ignored-files': @toggleIgnoredFiles documentation = {} for name, method of editorBindings @@ -953,6 +954,9 @@ class Editor extends View toggleLineCommentsInSelection: -> @activeEditSession.toggleLineCommentsInSelection() + toggleIgnoredFiles: -> + @rootView().toggleIgnoredFiles() + logRenderedLines: -> @renderedLines.find('.line').each (n) -> console.log n, $(this).text() diff --git a/src/app/project.coffee b/src/app/project.coffee index cd903b0cb..d8df938cc 100644 --- a/src/app/project.coffee +++ b/src/app/project.coffee @@ -15,7 +15,7 @@ class Project autoIndent: true softTabs: true softWrap: false - hideIgnoredFiles: false + hideIgnoredFiles: true rootDirectory: null editSessions: null ignoredPathRegexes: null @@ -79,7 +79,7 @@ class Project for regex in @ignoredPathRegexes return true if path.match(regex) - return true if @repo.isPathIgnored(path) + return true if @hideIgnoredFiles and @repo.isPathIgnored(path) return false @@ -94,7 +94,7 @@ class Project return true if name is ignored for regex in @ignoredPathRegexes return true if path.match(regex) - return true if @repo.isPathIgnored(path) + return true if @hideIgnoredFiles and @repo.isPathIgnored(path) return false @@ -117,6 +117,7 @@ class Project getSoftWrap: -> @softWrap setSoftWrap: (@softWrap) -> + toggleIgnoredFiles: -> @setHideIgnoredFiles(not @hideIgnoredFiles) getHideIgnoredFiles: -> @hideIgnoredFiles setHideIgnoredFiles: (@hideIgnoredFiles) -> diff --git a/src/app/root-view.coffee b/src/app/root-view.coffee index cc3610a20..1e5c6191f 100644 --- a/src/app/root-view.coffee +++ b/src/app/root-view.coffee @@ -182,6 +182,9 @@ class RootView extends View @showInvisibles = showInvisibles editor.setShowInvisibles(@showInvisibles) for editor in @getEditors() + toggleIgnoredFiles: -> + @project.toggleIgnoredFiles() + getEditors: -> @panes.find('.pane > .editor').map(-> $(this).view()).toArray()