CSSG-Labs / PyNote

Text Editor Written in Python
GNU General Public License v3.0
3 stars 4 forks source link

Added delete function to remove old text #25

Closed PatrickBruso closed 2 years ago

PatrickBruso commented 2 years ago

Fixes bug that retains old text when new file is open. Closes #16.

AdamLaine commented 2 years ago

@PatrickBruso I'm afraid I will wait to approve it. Reason: basically your function does a good thing, which resolves the bug I was talking about prior with the "open", but if there's some text already written, I think it will be better to ask the user via CustomPrompt if they want to save the inserted text (thus calling the "save" function, which I'll write a little later, but if you are faster than me you can put the empty function, which I'll fill later), if they want to discard it, thus calling the function you wrote or cancel the whole operation leaving the text intact. I think it is the best option, but tell me you opinion.