From 31403f4a5c103a8f78ee1893404abbcf7e6d8cde Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 15 Apr 2026 10:50:24 -0700 Subject: [PATCH] jotplugger: render segment range slices properly (#37837) --- tools/jotpluggler/app.h | 5 ++++- tools/jotpluggler/session.cc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/jotpluggler/app.h b/tools/jotpluggler/app.h index 55f6d3ef9..872a6973d 100644 --- a/tools/jotpluggler/app.h +++ b/tools/jotpluggler/app.h @@ -276,7 +276,10 @@ struct RouteIdentifier { std::string display_slice() const { const int begin = slice_explicit ? slice_begin : available_begin; const int end = slice_explicit ? slice_end : available_end; - if (end < 0 || end == begin) { + if (end < 0) { + return std::to_string(begin) + ":"; + } + if (end == begin) { return std::to_string(begin); } return std::to_string(begin) + ":" + std::to_string(end); diff --git a/tools/jotpluggler/session.cc b/tools/jotpluggler/session.cc index 22dd7dd46..173df7bc0 100644 --- a/tools/jotpluggler/session.cc +++ b/tools/jotpluggler/session.cc @@ -355,7 +355,7 @@ bool apply_route_slice_change(AppSession *session, UiState *state, std::string_v int begin = 0; int end = 0; if (!parse_slice_spec(slice_text, &begin, &end)) { - state->error_text = "Slice must be N or N:M."; + state->error_text = "Slice must be N, N:, or N:M."; state->open_error_popup = true; return false; }