Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/commands/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,16 @@ impl EditConfig {
metadata: &mut Vec<Hdr10PlusMetadata>,
) -> Result<()> {
let mut amount = 0;
let mut amplitude = 0;

for range in ranges {
if range.contains('-') {
let (start, end) = EditConfig::range_string_to_tuple(range)?;
ensure!(end < metadata.len(), "invalid end range {}", end);

amount += end - start + 1;
for _ in 0..amount {
amplitude = end - start + 1;
amount += amplitude;
for _ in 0..amplitude {
Comment thread
quietvoid marked this conversation as resolved.
Outdated
metadata.remove(start);
}
} else if let Ok(index) = range.parse::<usize>() {
Expand Down