lib/ppcurses/menu/Menu.rb in ppcurses-0.0.22 vs lib/ppcurses/menu/Menu.rb in ppcurses-0.0.23
- old
+ new
@@ -61,17 +61,13 @@
(@selection == n_choices-1) ? @selection = 0 : @selection += 1
self.show
return true
end
- if c == ENTER
+ if c == ENTER && !@global_action.nil?
unless @global_action.nil?
@global_action.execute
- end
-
- unless @menu_items[@selection].action.nil?
- @menu_items[@selection].action.execute
end
self.show
return true
end