diff --git a/sk-cli/src/xray/view/helpers.rs b/sk-cli/src/xray/view/helpers.rs index 7c62800d..ad9c549b 100644 --- a/sk-cli/src/xray/view/helpers.rs +++ b/sk-cli/src/xray/view/helpers.rs @@ -102,10 +102,7 @@ pub(super) fn format_list_entries<'a>( // error is present we create a separate span here. let (trunc_width, right_padding_width) = match err_span.width() { 0 => (width - LIST_PADDING, 0), - x => ( - width - (mid_padding_width + max_err_width + max_err_width - x + LIST_PADDING + LIST_PADDING), - max_err_width - x + LIST_PADDING, - ), + x => (width - (mid_padding_width + max_err_width + LIST_PADDING), max_err_width - x + LIST_PADDING), }; let right_padding_span = Span::styled(" ".repeat(right_padding_width), err_span.style); diff --git a/sk-cli/src/xray/view/tests/snapshots/skctl__xray__view__tests__view_test__itest_render_event_list_event_selected@2.snap b/sk-cli/src/xray/view/tests/snapshots/skctl__xray__view__tests__view_test__itest_render_event_list_event_selected@2.snap index e388fb4d..65bda7d4 100644 --- a/sk-cli/src/xray/view/tests/snapshots/skctl__xray__view__tests__view_test__itest_render_event_list_event_selected@2.snap +++ b/sk-cli/src/xray/view/tests/snapshots/skctl__xray__view__tests__view_test__itest_render_event_list_event_selected@2.snap @@ -1,5 +1,5 @@ --- -source: sk-cli/src/xray/tests/view_test.rs +source: sk-cli/src/xray/view/tests/view_test.rs expression: cf --- CompletedFrame { @@ -11,7 +11,7 @@ CompletedFrame { "│ 00:00:01 (1 applied/0 deleted) │", "│>> 00:00:02 (3 applied/0 deleted) 1 error/0 warnings │", "│++ + test-namespace/test_depl1 │", - "│ + test-namespace/test_depl2xxxxxxxxxxxxxxxxxxx... 1 error/0 warnings │", + "│ + test-namespace/test_depl2xxxxxxxxxxxxxxxxxxxxxx... 1 error/0 warnings │", "│ + test-namespace/test_depl3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... │", "│ 00:00:03 (0 applied/1 deleted) │", "│ │", @@ -37,7 +37,7 @@ CompletedFrame { x: 33, y: 4, fg: Reset, bg: Blue, underline: Reset, modifier: NONE, x: 79, y: 4, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, x: 4, y: 5, fg: Reset, bg: Reset, underline: Reset, modifier: ITALIC, - x: 56, y: 5, fg: White, bg: Red, underline: Reset, modifier: NONE, + x: 59, y: 5, fg: White, bg: Red, underline: Reset, modifier: NONE, x: 79, y: 5, fg: Reset, bg: Reset, underline: Reset, modifier: NONE, x: 4, y: 6, fg: Reset, bg: Reset, underline: Reset, modifier: ITALIC, x: 79, y: 6, fg: Reset, bg: Reset, underline: Reset, modifier: NONE,