mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
ncneofetch: don't print (null) for distro_pretty
This commit is contained in:
parent
d52ced823c
commit
d5dca33e00
@ -261,7 +261,7 @@ freebsd_ncneofetch(fetched_info* fi){
|
||||
.name = "FreeBSD",
|
||||
.logofile = NULL, // FIXME
|
||||
};
|
||||
(void)fi; // FIXME set up distro_pretty
|
||||
fi->distro_pretty = NULL;
|
||||
return &fbsd;
|
||||
}
|
||||
|
||||
@ -309,7 +309,9 @@ infoplane(struct notcurses* nc, const fetched_info* fi){
|
||||
ncplane_set_fg_rgb(infop, 0xd0, 0xd0, 0xd0);
|
||||
ncplane_set_attr(infop, NCSTYLE_UNDERLINE);
|
||||
ncplane_printf_aligned(infop, 1, NCALIGN_LEFT, " %s %s", fi->kernel, fi->kernver);
|
||||
ncplane_printf_aligned(infop, 1, NCALIGN_RIGHT, "%s ", fi->distro_pretty);
|
||||
if(fi->distro_pretty){
|
||||
ncplane_printf_aligned(infop, 1, NCALIGN_RIGHT, "%s ", fi->distro_pretty);
|
||||
}
|
||||
ncplane_set_attr(infop, NCSTYLE_NONE);
|
||||
#ifdef __linux__
|
||||
struct sysinfo sinfo;
|
||||
|
@ -360,7 +360,7 @@ TEST_CASE("NCPlane") {
|
||||
REQUIRE(0 < u2);
|
||||
REQUIRE(strlen(w1) == u1);
|
||||
REQUIRE(strlen(w2) == u2);
|
||||
CHECK(cell_double_wide_p(&c1));
|
||||
CHECK(mbswidth(w1) == 1 + cell_double_wide_p(&c1));
|
||||
CHECK_FALSE(cell_double_wide_p(&c2));
|
||||
cell_release(n_, &c1);
|
||||
cell_release(n_, &c2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user