projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce3fa38
)
boot: padding for default arrow at too long lines
author
MrSmör
<66489839+MrSmoer@users.noreply.github.com>
Thu, 16 Nov 2023 12:31:50 +0000
(13:31 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 20 Feb 2024 13:36:52 +0000
(14:36 +0100)
If the default boot entry name doesnt leave enough space for the
indicator arrow, it overwrote the first two characters of the entry
Now every line will always have enough padding.
src/boot/efi/boot.c
patch
|
blob
|
history
diff --git
a/src/boot/efi/boot.c
b/src/boot/efi/boot.c
index f9b506808a1728a4145cc4ee8cdfda33ba25a8ee..1e1c6a433eda167222918939703af8c8653cf544 100644
(file)
--- a/
src/boot/efi/boot.c
+++ b/
src/boot/efi/boot.c
@@
-746,6
+746,9
@@
static bool menu_run(
lines[i] = xnew(char16_t, line_width + 1);
padding = (line_width - MIN(strlen16(config->entries[i]->title_show), line_width)) / 2;
+ /* Make sure there is space for => */
+ padding = MAX((size_t) 2, padding);
+
for (j = 0; j < padding; j++)
lines[i][j] = ' ';