* view.c (view_handle_editkey): Simplified the code.

This commit is contained in:
Roland Illig 2005-04-13 21:34:57 +00:00
parent 1a26500862
commit ca1fc0467d
2 changed files with 5 additions and 9 deletions

View File

@ -32,6 +32,7 @@
* view.c (goto_addr): Fixed an off-by-one error.
* view.c (view_close_datasource): For the growing buffer cases,
check if the datasource has already been closed before.
* view.c (view_handle_editkey): Simplified the code.
2005-04-07 Roland Illig <roland.illig@gmx.de>

View File

@ -400,15 +400,10 @@ view_handle_editkey (WView *view, int key)
return MSG_NOT_HANDLED;
}
if (!node) {
node = (struct hexedit_change_node *)
g_new (struct hexedit_change_node, 1);
if (node) {
/* FIXME: Hexedit changes are not shown in textview mode. */
node->offset = view->edit_cursor;
node->value = byte_val;
enqueue_change (&view->change_list, node);
}
node = g_new (struct hexedit_change_node, 1);
node->offset = view->edit_cursor;
node->value = byte_val;
enqueue_change (&view->change_list, node);
} else {
node->value = byte_val;
}