You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The solution we've proposed is to have map height and width be compulsory (and not allow skipping should there not be any yet stored in the system). Then, instead of the current system where we use vim line numbers to correspond to the index, we would have vim pre-load with the necessary amount of numbers (height times width). This would both prevent the issue wherein accidentally deleting a line (using dd out of habit) would shift every other mapping by 1 and it would allow us to print warnings on close if unexpected data had been entered. (An unexpected amount of lines, indexes missing, 'corrupted' indexes, index out of order etc.)
The alternative solution is to again have height & width compulsory & simply warn if the number of lines at the end of the process is not equal to the expected value (width times height). This would also solve the accidental line deletion problem but in a less informative way.
The concern with using line numbers for the indexing of map key/val pairs is that a deletion of a line causes the indexing to shift.
Ideally it shouldn't be this easy to misalign the indexing.
Any ideas how we can better protect maps from this issue?
The text was updated successfully, but these errors were encountered: