From f237260c4be750f5cdfaa57713449c390453d889 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Thu, 8 Feb 2024 16:20:36 -0800 Subject: [PATCH] use numerical sort This should be a numerical sort, although it will not normally matter. --- lib/Perl/Tidy/VerticalAligner.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 0956ec0f..fa4dcac4 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -3684,7 +3684,7 @@ sub get_line_token_info { # handle no levels my $rtoken_patterns = {}; my $rtoken_indexes = {}; - my @levs = sort keys %saw_level; + my @levs = sort { $a <=> $b } keys %saw_level; if ( !defined($lev_min) ) { $lev_min = -1; $lev_max = -1; -- 2.39.5