LonnyGomes / hexcurse

Hexcurse is a ncurses-based console hexeditor written in C
Other
181 stars 17 forks source link

Add saved/unsaved status #37

Open prso opened 3 years ago

prso commented 3 years ago

Until now the question "Do you want to save changes?" at quit was triggered if the stack (for undo) was not empty, this was wrong because you could save at any point and this would not empty the stack, and you could undo changes previous to the save what is a desirable function.

Now we keep a saved/unsaved state that is set when saving (pushing a special value in the stack) that is carefully checked when using the undo function.

The unsaved state is indicated by "*" at top left, at right of current address, emacs style.