Skip to content

Commit

Permalink
[paint] stop processing line of plane on linefeed #2196
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Nov 25, 2021
1 parent d21660b commit 9409224
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Binary file added data/freebsd.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion src/fetch/main.c
Expand Up @@ -23,8 +23,28 @@
#endif
#include <notcurses/notcurses.h>
#include "compat/compat.h"
#include "builddef.h"
#include "ncart.h"

static inline const char*
path_separator(void){
#ifdef __MINGW64__
return "\\";
#else
return "/";
#endif
}

static inline char*
find_data(const char* datum){
const char* datadir = NOTCURSES_SHARE;
char* path = malloc(strlen(datadir) + 1 + strlen(datum) + 1);
strcpy(path, datadir);
strcat(path, path_separator());
strcat(path, datum);
return path;
}

typedef struct distro_info {
const char* name; // must match 'lsb_release -i'
const char* logofile; // kept at original aspect ratio, lain atop bg
Expand Down Expand Up @@ -405,7 +425,7 @@ static const distro_info*
freebsd_ncneofetch(fetched_info* fi){
static const distro_info fbsd = {
.name = "FreeBSD",
.logofile = NULL, // FIXME
.logofile = "freebsd.png",
};
fi->neologo = get_neofetch_art("BSD"); // use big daemon logo
fi->distro_pretty = NULL;
Expand Down
1 change: 1 addition & 0 deletions src/lib/render.c
Expand Up @@ -1256,6 +1256,7 @@ rasterize_core(notcurses* nc, const ncpile* p, fbuf* f, unsigned phase){
}
//fprintf(stderr, "damageidx: %ld\n", damageidx);
}
// shouldn't this happen only if the linefeed was on the last line? FIXME
if(saw_linefeed){
nc->rstate.logendx = 0;
}
Expand Down

0 comments on commit 9409224

Please sign in to comment.