diff --git a/form/frm_driver.c b/form/frm_driver.c index 6390bde..dc28d99 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -178,9 +178,7 @@ static int FE_Delete_Previous(FORM *); /* Logic to decide whether or not a field needs justification */ #define Justification_Allowed(field) \ (((field)->just != NO_JUSTIFICATION) && \ - (Single_Line_Field(field)) && \ - (((field)->dcols == (field)->cols) && \ - ((unsigned)(field)->opts & O_STATIC))) + (Single_Line_Field(field))) /* Logic to determine whether or not a dynamic field may still grow */ #define Growable(field) ((field)->status & _MAY_GROW) @@ -983,9 +981,9 @@ Perform_Justification(FIELD *field, WINDOW *win) if (len > 0) { - assert(win && (field->drows == 1) && (field->dcols == field->cols)); + assert(win && (field->drows == 1)); - switch (field->just) + if (field->cols - len >= 0) switch (field->just) { case JUSTIFY_LEFT: break; @@ -1444,7 +1443,19 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield) Window_To_Buffer(form, field); werase(form->w); Perform_Justification(field, form->w); - wsyncup(form->w); + if (form->w->_parent) wsyncup(form->w); + else + { copywin(form->w, + Get_Form_Window(form), + 0, + 0, + field->frow, + field->fcol, + field->frow, + field->cols + field->fcol - 1, + 0); + wsyncup (Get_Form_Window(form)); + } } } }