From 4ffc6243c0716110e3bd3a395ba2e6283214620a Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Tue, 12 May 2026 22:36:33 +0200 Subject: [PATCH] new framework fix --- lib/bbs/application.rb | 1 + lib/bbs/menu.rb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/bbs/application.rb b/lib/bbs/application.rb index 4cacce0..8fbdc55 100644 --- a/lib/bbs/application.rb +++ b/lib/bbs/application.rb @@ -174,6 +174,7 @@ module BBS # Menubar handles Alt-letter / F10 / its own keys if @menubar result = @menubar.handle_event(event) + $stderr.puts "[app] menubar handle_event -> #{result.inspect}" return :halt if result == :halt return nil if result end diff --git a/lib/bbs/menu.rb b/lib/bbs/menu.rb index 463bc1d..b8c8a38 100644 --- a/lib/bbs/menu.rb +++ b/lib/bbs/menu.rb @@ -120,7 +120,9 @@ module BBS when :escape, :f10 close when :enter - activate_current + r = activate_current + $stderr.puts "[menu] navigate enter -> #{r.inspect}" + return r else if event.char? activated = activate_by_hotkey(menu.items, event.key) @@ -192,6 +194,7 @@ module BBS return :handled unless item && !item.separator && item.enabled != false close result = item.on_select&.call(item) + $stderr.puts "[menu] activate_current item=#{item.label.inspect} result=#{result.inspect}" @on_activate&.call(item) result == :halt ? :halt : :handled end