mjdescy / TodoTxtMac

TodoTxtMac is a minimalist, keyboard-driven to-do manager for Mac OS X (10.8 Mountain Lion and higher) that conforms to the todo.txt format spec.
Other
242 stars 40 forks source link

All todos duplicated after inline edit #79

Closed metbril closed 8 years ago

metbril commented 9 years ago

After I do an inline edit for a todo, I see a message that the todofile is edited outside the application (it isn't). When I choose to 'revert' all todo's are appended once more to the todo.txt file.

I cannot exactly reproduce this error, but these were the steps I did:

  1. Edit and save todo.txt with a regular editor
  2. Refresh todo list in application (Use '.' shortcut)
  3. Double click an item in the list
  4. Edit the line (in my case, I changed the due date). A popup appears that the file has been modified
  5. Choose 'Revert'
  6. Save (Cmd-S)

Now the list has been duplicated.

mjdescy commented 9 years ago

You issue sounds familiar. It sounds like what was reported in Issue #14 (which was a filter issue that is now closed) and maybe elsewhere.

Tracking changes from edits outside TodoTxtMac (specifically, from outside non-NSDocument-based applications like TextEdit) is challenging. I am benefiting from and fighting the NSDocument framework that Cocoa provides. The popup notification about the file being edited outside the application is pure Cocoa/NSDocument, rather than something I coded. It sometimes pops up when I do not expect it to, as you describe. Cocoa seems to work best when only NSDocument-based apps are operating on the files simultaneously--which is an unlikely scenario. (See Issue #19 for more discussion.)

I am trying to reproduce the error, and will try to investigate it further if I can reproduce it.

metbril commented 9 years ago

Issue #14 was related to filters. In my case items are actually duplicated in the saved file. Have not been able to reproduce this myself, too.

mjdescy commented 9 years ago

Please let me know if the issues comes up again in version 1.6.0. I changed how the commands work to enable undo/redo support, and it may have inadvertently eliminated this problem (we hope!).

metbril commented 9 years ago

I will keep an eye on it.

metbril commented 8 years ago

Using release 1.6.1 and OS X 10.11.3

  1. Have a todo.txt with one todo item without any project or context
  2. Hit Cmd+F and type +Test (find items in project Test)
  3. The todo item will be hidden, since it doesn't comply to the filter
  4. Click in the main window (leave the search box)
  5. Click . to refresh the file (it shows as 'Edited')
  6. Click Cmd+S to save the file

Now I have duplicated todos. :(

mjdescy commented 8 years ago

I replicated this bug on my test build. I will look into it.