X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Freset_cmd.c;h=9d23cd05ec2e1bf5464194216af54227781986be;hp=c5d96a2e82ce4f041d70267958f9f3be370968df;hb=f3ec084eb66ba14feb6357b674fb85dd474933d8;hpb=296420e1ec091e6dbd354cc13748638637690776 diff --git a/progs/reset_cmd.c b/progs/reset_cmd.c index c5d96a2e..9d23cd05 100644 --- a/progs/reset_cmd.c +++ b/progs/reset_cmd.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 2016-2017,2019 Free Software Foundation, Inc. * + * Copyright 2019,2020 Thomas E. Dickey * + * Copyright 2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -52,7 +53,7 @@ #include #endif -MODULE_ID("$Id: reset_cmd.c,v 1.17 2019/05/25 22:36:53 tom Exp $") +MODULE_ID("$Id: reset_cmd.c,v 1.19 2020/02/02 23:34:34 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -495,6 +496,9 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings) ? reset_2string : init_2string); + if (VALID_STRING(clear_margins)) { + need_flush |= sent_string(clear_margins); + } else #if defined(set_lr_margin) if (VALID_STRING(set_lr_margin)) { need_flush |= sent_string(TPARM_2(set_lr_margin, 0, @@ -509,10 +513,8 @@ send_init_strings(int fd GCC_UNUSED, TTY * old_settings) columns - 1)); } else #endif - if (VALID_STRING(clear_margins) - && VALID_STRING(set_left_margin) + if (VALID_STRING(set_left_margin) && VALID_STRING(set_right_margin)) { - need_flush |= sent_string(clear_margins); need_flush |= to_left_margin(); need_flush |= sent_string(set_left_margin); if (VALID_STRING(parm_right_cursor)) {