diff --git a/lib/turnsole/global.rb b/lib/turnsole/global.rb index 8a22d62..5ee0fbc 100644 --- a/lib/turnsole/global.rb +++ b/lib/turnsole/global.rb @@ -83,10 +83,8 @@ def do action user_label = @context.input.ask_with_completions :label, "Show threads with label (enter for listing): ", labels if user_label # not canceled if user_label.empty? - @context.screen.spawn_unless_exists("Label list") do - mode = LabelListMode.new @context - mode - end + mode = LabelListMode.new @context + @context.screen.spawn_unless_exists("Label list") { mode } mode.load! else SearchResultsMode.spawn_from_query @context, "~#{user_label}"