mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
[ncman] handle tagged paragraphs
This commit is contained in:
parent
21488d394d
commit
e23cf59f57
@ -576,9 +576,9 @@ troff_parse(const unsigned char* map, size_t mlen, pagedom* dom){
|
||||
return -1;
|
||||
}
|
||||
current_para->ttype = node;
|
||||
}else if(node->ltype == LINE_TH){
|
||||
}else if(node->ltype == LINE_TP){
|
||||
if(dom->root == NULL){
|
||||
fprintf(stderr, "theorem transcends structure\n");
|
||||
fprintf(stderr, "tagged paragraph transcends structure\n");
|
||||
return -1;
|
||||
}
|
||||
if((current_para = add_node(current_para, NULL)) == NULL){
|
||||
@ -631,6 +631,7 @@ draw_domnode(struct ncplane* p, const pagedom* dom, const pagenode* n){
|
||||
ncplane_cursor_move_yx(p, -1, 0);
|
||||
break;
|
||||
case LINE_PP: // paragraph
|
||||
case LINE_TP: // tagged paragraph
|
||||
if(n->text){
|
||||
ncplane_cursor_move_rel(p, 2, 0);
|
||||
size_t b = 0;
|
||||
|
16
src/poc/cli3.c
Normal file
16
src/poc/cli3.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <notcurses/notcurses.h>
|
||||
|
||||
int main(void){
|
||||
struct notcurses_options opts = {
|
||||
.flags = NCOPTION_PRESERVE_CURSOR |
|
||||
NCOPTION_NO_CLEAR_BITMAPS |
|
||||
NCOPTION_DRAIN_INPUT,
|
||||
};
|
||||
struct notcurses* nc = notcurses_init(&opts, NULL);
|
||||
if(nc == NULL){
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
notcurses_render(nc);
|
||||
notcurses_stop(nc);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue
Block a user