fluentCODE / ScrawlIssues

Issue Tracker for Scrawl by fluentCODE
14 stars 0 forks source link

New file marks as dirty immediately #131

Closed dpen2000 closed 9 years ago

dpen2000 commented 9 years ago
  1. Click File/New file
  2. Note * next to Untitled in tabs
  3. Click File/Close file and note prompt to save file
  4. Add some text
  5. Remove text added in 4
  6. File should again be able to be closed without saving changes

File shouldn't need saving unless it has changes

stirno commented 9 years ago

The title I think is.. incorrect. A new file is dirty by default as in it has not been saved. As for the step 3, assuming you clicked Yes?

As for 5/6, we don't track changes with that granularity so if its different from the last time its been saved, its dirty.

dpen2000 commented 9 years ago

I was going off notepad.exe behaviour: a file isn't dirty when it's newly created with no changes (as in the title) and isn't dirty when it's been modified and modified back to original state. Sorry, was combining both scenarios into one ticket here.

pauljz commented 9 years ago

We've been talking this one over for a while. We think we're going to keep this as-is for now (with the thinking that even empty new buffers are unsaved, and therefore are dirty), but future changes will make it largely moot.

Most file creation in the future will be done by creating a file with a name and type, which will get saved on creation with some scaffolded content/boilerplate. We're going to make this a smoother experience than the kinda clunky dialogs you get in a lot of IDEs, but it's a way we want to go in general, since when you're creating a file, you usually know what you're creating.