profile-edit-traverse #199

Merged
lash merged 26 commits from profile-edit-traverse into master 2024-12-05 16:37:37 +01:00
Showing only changes of commit 9e998f9a29 - Show all commits

View File

@ -9,6 +9,10 @@ func (p *Profile) InsertOrShift(index int, value string) {
if index < len(p.ProfileItems) {
p.ProfileItems = append(p.ProfileItems[:index], value)
} else {
p.ProfileItems = append(p.ProfileItems, value)
for len(p.ProfileItems) < index {
p.ProfileItems = append(p.ProfileItems, "0")
}
p.ProfileItems = append(p.ProfileItems, "0")
p.ProfileItems[index] = value
}
}