mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Observe the config from tree view to show/hide git-ignored files
This commit is contained in:
@@ -15,7 +15,6 @@ class Project
|
||||
autoIndent: true
|
||||
softTabs: true
|
||||
softWrap: false
|
||||
hideIgnoredFiles: false
|
||||
rootDirectory: null
|
||||
editSessions: null
|
||||
ignoredPathRegexes: null
|
||||
@@ -71,7 +70,7 @@ class Project
|
||||
@ignoreRepositoryPath(path)
|
||||
|
||||
ignoreRepositoryPath: (path) ->
|
||||
@hideIgnoredFiles and @repo.isPathIgnored(fs.join(@getPath(), path))
|
||||
config.core.hideGitIgnoredFiles and @repo.isPathIgnored(fs.join(@getPath(), path))
|
||||
|
||||
resolve: (filePath) ->
|
||||
filePath = fs.join(@getPath(), filePath) unless filePath[0] == '/'
|
||||
@@ -89,10 +88,6 @@ class Project
|
||||
getSoftWrap: -> @softWrap
|
||||
setSoftWrap: (@softWrap) ->
|
||||
|
||||
toggleIgnoredFiles: -> @setHideIgnoredFiles(not @hideIgnoredFiles)
|
||||
getHideIgnoredFiles: -> @hideIgnoredFiles
|
||||
setHideIgnoredFiles: (@hideIgnoredFiles) ->
|
||||
|
||||
buildEditSessionForPath: (filePath, editSessionOptions={}) ->
|
||||
@buildEditSession(@bufferForPath(filePath), editSessionOptions)
|
||||
|
||||
|
||||
@@ -90,7 +90,9 @@ class RootView extends View
|
||||
@command 'window:toggle-invisibles', =>
|
||||
config.editor.showInvisibles = not config.editor.showInvisibles
|
||||
config.update()
|
||||
@command 'window:toggle-ignored-files', => @toggleIgnoredFiles()
|
||||
@command 'window:toggle-ignored-files', =>
|
||||
config.core.hideGitIgnoredFiles = not config.core.hideGitIgnoredFiles
|
||||
config.update()
|
||||
|
||||
afterAttach: (onDom) ->
|
||||
@focus() if onDom
|
||||
@@ -198,9 +200,6 @@ class RootView extends View
|
||||
updateWindowTitle: ->
|
||||
document.title = @title
|
||||
|
||||
toggleIgnoredFiles: ->
|
||||
@project.toggleIgnoredFiles()
|
||||
|
||||
getEditors: ->
|
||||
@panes.find('.pane > .editor').map(-> $(this).view()).toArray()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user