X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffrm_driver.c;h=d550953737083fcd44b9eae145dede9ee6f4e3a9;hp=354bace8b4f38896cc400c134cb9e1088971586d;hb=5242fccf157e715ed878455a3efea6c82b840eb5;hpb=ca5fdd32fd43d84fe3d720cd5c07fba28fc506a4 diff --git a/form/frm_driver.c b/form/frm_driver.c index 354bace8..d5509537 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.76 2006/11/04 18:45:35 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.78 2007/02/04 00:28:38 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -262,7 +262,19 @@ wins_wchnstr(WINDOW *w, cchar_t *s, int n) static int fix_wchnstr(WINDOW *w, cchar_t *s, int n) { + int x; + win_wchnstr(w, s, n); + /* + * This function is used to extract the text only from the window. + * Strip attributes and color from the string so they will not be added + * back when copying the string to the window. + */ + for (x = 0; x < n; ++x) + { + RemAttr(s[x], A_ATTRIBUTES); + SetPair(s[x], 0); + } return n; } @@ -651,6 +663,7 @@ Field_Grown(FIELD *field, int amount) result = TRUE; /* allow sharing of recovery on failure */ + T((T_CREATE("fieldcell %p"), newbuf)); field->buf = newbuf; for (i = 0; i <= field->nbuf; i++) {