Skip to content

Commit

Permalink
Preserve summary width and indent in OptionParser context
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Jan 7, 2025
1 parent a636b4d commit 7f082b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/option_parser.cr
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ class OptionParser
old_missing_option = @missing_option
old_invalid_option = @invalid_option
old_before_each = @before_each
old_summary_width = @summary_width
old_summary_indent = @summary_indent

begin
yield
Expand All @@ -361,6 +363,8 @@ class OptionParser
@missing_option = old_missing_option
@invalid_option = old_invalid_option
@before_each = old_before_each
@summary_width = old_summary_width
@summary_indent = old_summary_indent
end
end

Expand Down

0 comments on commit 7f082b0

Please sign in to comment.