From 7f082b0fe7b6557df1845073889e425b197d1f60 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Tue, 7 Jan 2025 21:19:53 +0900 Subject: [PATCH] Preserve summary width and indent in OptionParser context --- src/option_parser.cr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/option_parser.cr b/src/option_parser.cr index e372dc3834e2..72032dfa697a 100644 --- a/src/option_parser.cr +++ b/src/option_parser.cr @@ -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 @@ -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