Commit c1b092e6 authored by Kyle McKay's avatar Kyle McKay 💬

mincurses.c: send ena_acs string to correct location

The call to _nc_init_acs in min_panel_init() will, indeed, attempt
to output the ena_acs string (among other activities) if it's set.

However, it may output it using putc to the stdio FILE handle.

That may, or may not, be the actual output device that we are using.

In any case, to be sure we end up with ena_acs having been output
at least once to the intended output device, flush all output streams
after calling _nc_init_acs and then output ena_acs once more (if
it's set), just in case.

To be clear, the call to _nc_init_acs MUST still be made regardless
of whether it outputs ena_acs because _nc_init_acs performs various
other tasks required to make the alternate character set work --
outputting ena_acs (when set) is just one of the things it does.
Signed-off-by: Kyle McKay's avatarKyle J. McKay <mackyle@gmail.com>
parent a2b23998
......@@ -391,8 +391,10 @@ int min_panel_init(int pl){
setup_term_customize();
/* enable graphics character set */
//if(ena_acs)min_putp(ena_acs);
_nc_init_acs();
fflush(NULL); /* flush all output streams */
/* _nc_init_acs may not have sent it to the correct device */
if(ena_acs)min_putp(ena_acs);
if(!cursor_up || !cursor_down || pl>lines ||
(!column_address && !cursor_address && (!carriage_return || !parm_right_cursor))){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment