Refactor: simplify word navigation logic, improve line wrapping, and enhance parameter initialization across core and TUI modules.

This commit is contained in:
2025-09-30 02:54:07 +02:00
parent 8ee4c5f384
commit 053f389b1e
6 changed files with 27 additions and 45 deletions

View File

@@ -106,13 +106,11 @@ impl Router {
return true;
}
if pattern.ends_with('*') {
let prefix = &pattern[..pattern.len() - 1];
if let Some(prefix) = pattern.strip_suffix('*') {
return model.starts_with(prefix);
}
if pattern.starts_with('*') {
let suffix = &pattern[1..];
if let Some(suffix) = pattern.strip_prefix('*') {
return model.ends_with(suffix);
}