GeorgRottensteiner / C64Studio

C64Studio is a .NET based IDE specializing in game development for the C64 in assembler and BASIC
Other
252 stars 38 forks source link

Automatic Renumber Off by Default #96

Open ctsmith2 opened 12 months ago

ctsmith2 commented 12 months ago

Basic editor.

If "To Label Mode" is accidentally hit, and then "To Number Mode" is used to go back, all lines are automatically renumbered.

This may not be wanted, if using line numbers that are not consistent, with GOTO's.

Possibly set automatically renumber to off by default?

GeorgRottensteiner commented 12 months ago

Oooh, that's a tricky one :)

For one, I need to remember the original numbers somewhere, in the file itself? Currently it is possible to save the label mode code as is.

What if you modify the code, e.g. add lines in between, which numbers do they receive? What happens, if they original numbers cannot be restored since too many new lines were inserted?

All in all, it's not impossible, just might get really tricky to pull off.

ctsmith2 commented 12 months ago

The first time you click on "To Label Mode" the user should be prompted with.

Any custom line numbering will be lost.

Continue? Y/N