mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Update gitignore decorations when .git/info/exclude file is edited (#106270)
* detect local `exclude` file edits * use `uri.path` to detect exclude file edits `uri.path` uses forward slash as a path separator indepentent of the host system, which makes it easier to use with regex
This commit is contained in:
parent
d2da7e966e
commit
7792c61393
|
@ -21,7 +21,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
|
||||||
|
|
||||||
constructor(private model: Model) {
|
constructor(private model: Model) {
|
||||||
this.onDidChangeDecorations = fireEvent(anyEvent<any>(
|
this.onDidChangeDecorations = fireEvent(anyEvent<any>(
|
||||||
filterEvent(workspace.onDidSaveTextDocument, e => e.fileName.endsWith('.gitignore')),
|
filterEvent(workspace.onDidSaveTextDocument, e => /\.gitignore$|\.git\/info\/exclude$/.test(e.uri.path)),
|
||||||
model.onDidOpenRepository,
|
model.onDidOpenRepository,
|
||||||
model.onDidCloseRepository
|
model.onDidCloseRepository
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in a new issue