mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-10-31 15:20:13 +00:00
ncselector_redraw(): don't call notcurses_render() #627
This commit is contained in:
parent
7fc761296f
commit
c618096083
5
NEWS.md
5
NEWS.md
@ -1,6 +1,11 @@
|
||||
This document attempts to list user-visible changes and any major internal
|
||||
rearrangements of Notcurses.
|
||||
|
||||
* 1.6.12 (not yet released)
|
||||
* `ncselector_redraw()` and `ncmultiselector_redraw()` no longer call
|
||||
`notcurses_render()`. You will need to call `notcurses_render()` for the
|
||||
display to reflect any changes.
|
||||
|
||||
* 1.6.11 (2020-08-03)
|
||||
* `cell_egc_idx()` is no longer exported; it was never intended to be.
|
||||
|
||||
|
4
USAGE.md
4
USAGE.md
@ -174,8 +174,8 @@ updated to reflect the changes:
|
||||
// successful call to notcurses_render().
|
||||
int notcurses_render(struct notcurses* nc);
|
||||
|
||||
// Write the last rendered frame, in its entirety, to 'fp'. This is not valid
|
||||
// until notcurses_render() has been successfully called at least once.
|
||||
// Write the last rendered frame, in its entirety, to 'fp'. If
|
||||
// notcurses_render() has not yet been called, nothing will be written.
|
||||
int notcurses_render_to_file(struct notcurses* nc, FILE* fp);
|
||||
|
||||
// Retrieve the contents of the specified cell as last rendered. The EGC is
|
||||
|
@ -909,8 +909,8 @@ API int notcurses_stop(struct notcurses* nc);
|
||||
// successful call to notcurses_render().
|
||||
API int notcurses_render(struct notcurses* nc);
|
||||
|
||||
// Write the last rendered frame, in its entirety, to 'fp'. This is not valid
|
||||
// until notcurses_render() has been successfully called at least once.
|
||||
// Write the last rendered frame, in its entirety, to 'fp'. If
|
||||
// notcurses_render() has not yet been called, nothing will be written.
|
||||
API int notcurses_render_to_file(struct notcurses* nc, FILE* fp);
|
||||
|
||||
// Return the topmost ncplane, of which there is always at least one.
|
||||
|
@ -24,6 +24,17 @@ typedef struct nctablet {
|
||||
// Fourth rule: the focused tablet should remain where it is across redraws,
|
||||
// except as necessary to accommodate the prior rules.
|
||||
//
|
||||
// At any time, you can make three types of moves:
|
||||
// - move up from the topmost tablet
|
||||
// - move down from the bottommost tablet
|
||||
// - move otherwise
|
||||
// The first two are simple -- draw the focused tablet next to the appropriate
|
||||
// border of the reel, and then draw what we can in the other direction until
|
||||
// running out of space (and then shift up if there is more than one line of
|
||||
// gap at the top, or if we were moving up from the topmost tablet). This can
|
||||
// be done independently of all other tablets; it is immaterial if some were
|
||||
// removed, added, etc.
|
||||
//
|
||||
// The visible screen can be reconstructed from four things:
|
||||
// * which tablet is focused (pointed at by ncreel->tablets)
|
||||
// * which row the focused tablet starts at (derived from focused tablet)
|
||||
|
@ -141,7 +141,7 @@ ncselector_draw(ncselector* n){
|
||||
}
|
||||
}
|
||||
n->darrowy = yoff;
|
||||
return notcurses_render(n->ncp->nc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// calculate the necessary dimensions based off properties of the selector and
|
||||
@ -599,7 +599,7 @@ ncmultiselector_draw(ncmultiselector* n){
|
||||
ncplane_putegc_yx(n->ncp, yoff, n->arrowx, "↓", NULL);
|
||||
}
|
||||
n->darrowy = yoff;
|
||||
return notcurses_render(n->ncp->nc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char* ncmultiselector_previtem(ncmultiselector* n){
|
||||
|
@ -486,7 +486,6 @@ auto ncvisual_simple_streamer(ncvisual* ncv, struct ncvisual_options* vopts,
|
||||
}
|
||||
int ret = 0;
|
||||
if(curry){
|
||||
// need a cast for C++ callers
|
||||
ncplane* subncp = static_cast<ncplane*>(curry);
|
||||
char* subtitle = ncvisual_subtitle(ncv);
|
||||
if(subtitle){
|
||||
|
Loading…
Reference in New Issue
Block a user