Support 0-length scopes

This commit is contained in:
mars 2023-04-12 12:40:39 -04:00
parent 86bbfcda60
commit 78b24c4203
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ impl Theme {
let mut longest_len = 0;
for (target, style) in self.styles.iter() {
if target.len() > longest_len && scope.starts_with(target) {
if target.len() >= longest_len && scope.starts_with(target) {
longest = *style;
longest_len = target.len();
}