diff --git a/lib/widget/widget-common.c b/lib/widget/widget-common.c index 38b82836e..08b5e765c 100644 --- a/lib/widget/widget-common.c +++ b/lib/widget/widget-common.c @@ -573,7 +573,8 @@ widget_replace (Widget * old_w, Widget * new_w) { GList *l; - for (l = group_get_widget_next_of (holder); widget_is_focusable (WIDGET (l->data)); + for (l = group_get_widget_next_of (holder); + !widget_is_focusable (WIDGET (l->data)) && l != holder; l = group_get_widget_next_of (l)) ;