summaryrefslogtreecommitdiff
path: root/lib/libform/frm_driver.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-01-18 18:57:52 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-01-18 18:57:52 +0000
commitce727f262c394bb3a8004a723b658c1bcc17d96b (patch)
tree059f34173d07348369c8501180850663fd01cd06 /lib/libform/frm_driver.c
parentda4f2c6f45c474f93c31714faee3bb6ecd45999e (diff)
Merge a change from ncurses upstream to correctly recalculate a form
field size on set. Fixes an issue found by canacar@ who provided a similar fix. ok canacar
Diffstat (limited to 'lib/libform/frm_driver.c')
-rw-r--r--lib/libform/frm_driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libform/frm_driver.c b/lib/libform/frm_driver.c
index ea428fd113c..266140af9a8 100644
--- a/lib/libform/frm_driver.c
+++ b/lib/libform/frm_driver.c
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_driver.c,v 1.9 2010/01/12 23:22:07 nicm Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.10 2011/01/18 18:57:51 nicm Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
@@ -4347,7 +4347,9 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
* field->cols))))
RETURN(E_SYSTEM_ERROR);
+#if !USE_WIDEC_SUPPORT
len = vlen;
+#endif
}
}
@@ -4366,6 +4368,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
delwin(field->working);
field->working = newpad(field->drows, field->dcols);
}
+ len = Buffer_Length(field);
wclear(field->working);
mvwaddstr(field->working, 0, 0, value);