jotplugger: render segment range slices properly (#37837)

This commit is contained in:
Adeeb Shihadeh
2026-04-15 10:50:24 -07:00
committed by GitHub
parent 117d5cee4f
commit 31403f4a5c
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -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);
+1 -1
View File
@@ -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;
}