CSSG-Labs / PyNote

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

28-text-update-flag + bug-fixing #29

Closed AdamLaine closed 2 years ago

AdamLaine commented 2 years ago

Issue #28 This one is a little against contributing rules, but I didn't want to waste time, so my apologies I took some liberty in repairing some old stuff and making everything stable.

  1. Added text_is_changed
  2. To make it work I had to change back 't = self.text.get("1.0", "end")' to 't = self.text.get("1.0", "end-1c")', but to maintain the functionality that was requested before "the newline in the end" (so as cat command will work beautifully) it adds a newline when writing to a file (so basically from the outside nothing changes)
  3. In the "saveas" it seemed logical that once we do "saveas" it also records the file location so as any subsequent "save" won't have to ask for it again
  4. Inside "saveas" and "save" to maintain the logic 't' was renamed to 'saved_t'

If you have any problems feel free to tell me your opinion.