+ if (type == REG_BINARY) {
+ size_t len = 8;
+ const void *buf = NULL;
+
+ if (vitem) {
+ len = vitem->data.length;
+ buf = vitem->data.data;
+ }
+ edit->buf = hexedit_new(edit, edit->dia->sub_window, 10,
+ 5, 0, buf, len);
+ if (edit->buf == NULL) {
+ goto finish;
+ }
+ hexedit_refresh(edit->buf);
+ hexedit_set_cursor(edit->buf);
+ edit->input_win = derwin(edit->dia->sub_window, 2,
+ ncols - 3, 0, 0);
+
+ } else {
+ val_rows = 1;
+ if (type == REG_MULTI_SZ) {
+ val_rows += 4;
+ }
+ edit->field[1] = new_field(val_rows, ncols - 4, 4, 1, 0, 0);
+ if (edit->field[1] == NULL) {
+ goto finish;
+ }
+ edit->input_win = derwin(edit->dia->sub_window, nlines - 3,
+ ncols - 3, 0, 0);