diff --git a/CHANGELOG.md b/CHANGELOG.md index af86a776..0950f0cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,11 @@ This project adheres to [Semantic Versioning](http://semver.org/). [Unpublished] ------------- -### Changed -- [[`#437`](https://github.com/DanBrooker/file-icons/issues/437)] Clarified wording of package settings +### Fixed +- [[`#435`](https://github.com/DanBrooker/file-icons/issues/435)] Icon of [`markdown-preview`] misaligned after reloading +- [[`#437`](https://github.com/DanBrooker/file-icons/issues/437)] Ambiguous wording of package settings + +[`markdown-preview`]: https://github.com/atom/markdown-preview [1.7.21] - 2016-10-12 diff --git a/index.coffee b/index.coffee index 610d3184..f0d0eebf 100644 --- a/index.coffee +++ b/index.coffee @@ -31,6 +31,13 @@ module.exports = atom.config.set colouredIcons, !(atom.config.get colouredIcons) @observe true + + # gh-435: Strip path attributes from Markdown-Preview on startup + atom.packages.onDidActivateInitialPackages -> + selector = '.file-icons-tab-pane-icon .tab[data-type="MarkdownPreviewView"]' + tabs = atom.views.getView(atom.workspace).querySelectorAll(selector) + for tab in tabs + tab.itemTitle.removeAttribute "data-path" atom.config.onDidChange 'file-icons.forceShow', ({newValue, oldValue}) => @forceShow newValue