ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.28k stars 99 forks source link

When an active todo.txt file is deleted (or becomes unavailable), the tab is closed, but the file's contents still show on the screen #670

Closed DeflateAwning closed 3 months ago

DeflateAwning commented 4 months ago

Bug Report

Important

App Version: v2.0.12-rc.1

Platform: Linux

Installation Method: deb

Steps to Reproduce:

  1. Ensure that you have at least one normal tab open in sleek.
  2. Create an empty todo.txt file.
  3. Fill it with a todo item.
  4. Open that file with sleek, and have it active (i.e., that tab is active).
  5. Delete the file on disk.
  6. Observe that the tab is removed/deleted, but that the todo list still shows the previous todo items in that file from before it was deleted.

Expected behavior: When the file is deleted, the tab should close (as it currently does), but the todo list should show the todo items in the file that becomes active.

Notes: This doesn't seem like a big deal, but it comes up quite a bit with Syncthing because files become unwritable briefly sometimes.

In addition to fixing this bug, it'd be awesome if Sleek didn't require closing/reopening the file if it's resynced by Syncthing (but that's probably a bigger fix).

ransome1 commented 3 months ago

@DeflateAwning could you please check if this now works as expected in the latest pre-release?

DeflateAwning commented 3 months ago

Haven't seen it break, but this one's a tough one to verify as it was only happening sometimes. Thanks for the fix; will update if I see it happen again!