fix alignment of pipes on favorited directories
- SHA
519ccdf19f946ff3abe1d8735ea3e81543f20eef- Parents
-
b6496dc - Tree
cac8e2d
519ccdf
519ccdf19f946ff3abe1d8735ea3e81543f20eefb6496dc
cac8e2d| Status | File | + | - |
|---|---|---|---|
| M |
.gitignore
|
1 | 0 |
| M |
src/ui/display.f90
|
2 | 2 |
.gitignoremodified@@ -1,1 +1,2 @@ | ||
| 1 | 1 | tests/ |
| 2 | +scratch | |
src/ui/display.f90modified@@ -89,7 +89,7 @@ contains | ||
| 89 | 89 | display_len = 0 |
| 90 | 90 | if (parent_is_favorite(parent_idx)) then |
| 91 | 91 | fname = "★ " // trim(fname) |
| 92 | - display_len = 1 ! Star takes 2 visual columns, so add 1 extra | |
| 92 | + display_len = -2 ! "★ " is 4 bytes but 2 visual cols, so subtract 2 | |
| 93 | 93 | end if |
| 94 | 94 | |
| 95 | 95 | if (parent_is_dir(parent_idx) .and. parent_files(parent_idx) /= "." .and. parent_files(parent_idx) /= "..") then |
@@ -129,7 +129,7 @@ contains | ||
| 129 | 129 | display_len = 0 |
| 130 | 130 | if (current_is_favorite(current_idx)) then |
| 131 | 131 | fname = "★ " // trim(fname) |
| 132 | - display_len = 1 ! Add 1 to account for star being 2 visual columns | |
| 132 | + display_len = -2 ! "★ " is 4 bytes but 2 visual cols, so subtract 2 | |
| 133 | 133 | end if |
| 134 | 134 | |
| 135 | 135 | if (current_is_dir(current_idx) .and. current_files(current_idx) /= "." .and. current_files(current_idx) /= "..") then |