mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[tfman] colorize structure based off distance #2457
This commit is contained in:
parent
9fda62030d
commit
5295d0c938
@ -829,8 +829,8 @@ render_troff(struct notcurses* nc, const unsigned char* map, size_t mlen,
|
||||
return pman;
|
||||
}
|
||||
|
||||
static const char USAGE_TEXT[] = "⎥b⇞k↑j↓f⇟⎢ (q)uit";
|
||||
static const char USAGE_TEXT_ASCII[] = "(bkjf) (q)uit";
|
||||
static const char USAGE_TEXT[] = "⎥⇆/s⎢⎥b⇞k↑↓j⇟f⎢ (q)uit";
|
||||
static const char USAGE_TEXT_ASCII[] = "(tab/s) (bkjf) (q)uit";
|
||||
|
||||
static int
|
||||
draw_bar(struct ncplane* bar, pagedom* dom){
|
||||
@ -957,6 +957,12 @@ manloop(struct notcurses* nc, const char* arg){
|
||||
notcurses_refresh(nc, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
case 's':
|
||||
// FIXME toggle structure browser visibility
|
||||
break;
|
||||
case NCKEY_TAB: case L'\u21c6':
|
||||
// FIXME switch between browsers
|
||||
break;
|
||||
case 'k': case NCKEY_UP:
|
||||
if(ncplane_y(page)){
|
||||
ncplane_move_rel(page, 1, 0);
|
||||
|
@ -20,9 +20,9 @@ static int
|
||||
docstruct_callback(struct ncplane* n, void* curry, int i){
|
||||
if(n){
|
||||
docnode* dn = curry;
|
||||
uint64_t channels = NCCHANNELS_INITIALIZER(0, 0, 0, 0x49, 0x9d, 0x63);
|
||||
ncplane_set_base(n, "", 0, channels);
|
||||
ncplane_set_fg_rgb(n, 0xffffff);
|
||||
uint64_t channels =
|
||||
NCCHANNELS_INITIALIZER(0xff, 0xff, 0xff, 0x49, (0x9d - 0x10 * i), 0x63);
|
||||
ncplane_set_channels(n, channels);
|
||||
ncplane_erase(n);
|
||||
//ncplane_putstr(n, dn->title);
|
||||
ncplane_putstr_aligned(n, 0, NCALIGN_RIGHT, dn->title);
|
||||
|
Loading…
x
Reference in New Issue
Block a user