mbbill / undotree

The undo history visualizer for VIM
http://www.vim.org/scripts/script.php?script_id=4177
BSD 3-Clause "New" or "Revised" License
3.97k stars 101 forks source link

Missing numbers in undohistory #137

Open PedroVSCoimbra opened 2 years ago

PedroVSCoimbra commented 2 years ago

Hello, I was editing a file and going to very old stages in the undo tree. But suddenly I could not see the hole history of changes. The history reset.

2022-05-11-@00-09-48-scrot

It used to show all the changes from 0 to 2600. What could have happened? Can I recover the file in this stated?

mbbill commented 2 years ago

you might want to check if you have set the undolevels somewhere. It's the maximum number of changes that can be undone. undotree.vim will not touch the undo history unless you type C and then double confirm by typing YES. This is unlikely to happen by accident, so I guess you might have just hit the maximum undo levels.

PedroVSCoimbra commented 2 years ago

Well, probably. Do you know the behavior when we hit the maximum undo levels? Shouldn't it delete one by one? In my case it delete like 2000 in one go.

I also think that it might have something to do with editing a text what was too early in the history and doing changes there. Is that a possibility?

mbbill commented 2 years ago

yeah the document for the setting sounds like it should delete the history once hitting the limit and maintaining a sliding window of the newest changes but I haven't tested it, and maybe it works differently in some situations idk. Do you have the undolevels set? or maybe some other plug-ins are messing with it?