Skip to content

Commit c8e84f6

Browse files
committed
changefile
fix(window-state): Remove unnecessary reference in denylist pattern processing chore(changes): Update window-state and window-state-js versioning for glob pattern support docs(window-state): Update glob pattern denylist documentation for clarity
1 parent 2847f11 commit c8e84f6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
window-state: patch
3+
window-state-js: patch
4+
---
5+
6+
Introduces the ability to use glob patterns in the denylist for windows that shouldn't be tracked and managed. This allows for more flexible window matching, such as ignoring multiple windows that fit a certain naming pattern.

plugins/window-state/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl Builder {
352352

353353
let mut denylist_patterns = Vec::new();
354354
for pattern in denylist {
355-
denylist_patterns.push(glob::Pattern::new(&pattern)?);
355+
denylist_patterns.push(glob::Pattern::new(pattern)?);
356356
}
357357
self.denylist = denylist_patterns;
358358
Ok(self)
@@ -421,7 +421,6 @@ impl Builder {
421421
.map(|map| map(window.label()))
422422
.unwrap_or_else(|| window.label());
423423

424-
425424
for pattern in &self.denylist {
426425
if pattern.matches(label) {
427426
return;

0 commit comments

Comments
 (0)