vishr/local-history

Can't use "Save Now" and other functions not working properly

remysalim opened this issue · 10 comments

Basically, Local History doesn't work at all for me.
I'm not able to use any of the functions, despite the history files being present in the directory (accessed through Local History : Open Directory). It says it can't find anything

Local History not found for (...)

On 'Save Now' :

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 574, in run_
    return self.run(edit)
  File "LocalHistory in C:\Users\Me\AppData\Roaming\Sublime Text 3\Installed Packages\Local History.sublime-package", line 159, in run
NameError: global name 'view' is not defined

Also, maybe relevant maybe not, I'm working on files on a separate drive than C

vishr commented

@jrappen can you look at it?

@IOMachinery

  • ST Build? OS?
  • version of Local History?

Sublime Text 3 Build 3114 on Windows 10 x64
Local History from Package Control, latest version I suppose 2016.06.14.22.10.34

Maybe do a rollback until I've found a solution. Local History works for me except the SaveNow text command. Which I do not understand, as the other text commands work just fine.

I have exactly the same problem as the OP, but on Windows 8.1 x64.

byaka commented

same problem.
Ubuntu 14.04, ST3 3114

byaka commented

fix

class HistorySaveNow(sublime_plugin.TextCommand):

    def run(self, edit):
        t = Thread(target=HistorySave().process_history, args=(self.view.file_name(),))
        t.start()

byaka's fix is working for the Save Now issue!

In the meantime I tested the plugin with different files, and it works with any file (to my knowledge) on C: drive, but it won't find any local saves for the ones stored on my D: drive

byaka commented

but it won't find any local saves for the ones stored on my D: drive

i can't check this behavior, i have no windows. Can you please post tree-structure of folders in your backup folder? And also full patch to file from D, that was backuped (for example with "save now").

and i think this problem must be separated to another issue.

You're right, see #72