Commit b83daebe authored by claes's avatar claes

Remove ctrl characters from input

parent 47007d53
...@@ -352,9 +352,16 @@ static void watt_activate_cmd_input( Widget w, WAtt *watt, XmAnyCallbackStruct * ...@@ -352,9 +352,16 @@ static void watt_activate_cmd_input( Widget w, WAtt *watt, XmAnyCallbackStruct *
static void watt_activate_cmd_scrolled_ok( Widget w, WAtt *watt, XmAnyCallbackStruct *data) static void watt_activate_cmd_scrolled_ok( Widget w, WAtt *watt, XmAnyCallbackStruct *data)
{ {
char *text; char *text;
unsigned char *s;
int sts; int sts;
text = XmTextGetString( watt->cmd_scrolledinput); text = XmTextGetString( watt->cmd_scrolledinput);
// Replace ctrl characters with space
for ( s = (unsigned char *) text; *s; s++) {
if ( *s < ' ' && *s != 10 && *s != 13)
*s = ' ';
}
if ( watt->input_open) if ( watt->input_open)
{ {
sts = ((WAttNav *)watt->wattnav)->set_attr_value( watt->input_node, sts = ((WAttNav *)watt->wattnav)->set_attr_value( watt->input_node,
......
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