Pi66

Home | Repos | About | Blog | Gaza

pind
Simple Rust hotkey daemon.
git clone https://git.pi66.xyz/pind

About | Files | Commits | Refs | License


fix: handle empty lines in config

Author: pixel2175
Date: 2025-08-14 14:20
commit: 58efa3a5

Stat

M src/main.rs 2 +1 -1

Diff

diff --git a/src/main.rs b/src/main.rs
index 942da44..7ecdf48 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -165,7 +165,7 @@ fn load_config(config:&str) -> Vec<(AttributeSet<KeyCode>, String)>
         exit(1)
     });
     for line in content.lines() {
-        if !line.starts_with("#") || line.trim().is_empty() {
+        if !line.starts_with("#") && !line.trim().is_empty() {
             let mut l = line.splitn(2, ":");
             let key = l
                 .next()

// Created by Pi66

// Copyright ©Pi66 2026