Skip to main content
Module

x/ddc_vim/deps.ts>fn.undotree

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.undotree
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { undotree } = fn;

Return the current state of the undo tree in a dictionary with the following items: "seq_last" The highest undo sequence number used. "seq_cur" The sequence number of the current position in the undo tree. This differs from "seq_last" when some changes were undone. "time_cur" Time last used for |:earlier| and related commands. Use |strftime()| to convert to something readable. "save_last" Number of the last file write. Zero when no write yet. "save_cur" Number of the current position in the undo tree. "synced" Non-zero when the last undo block was synced. This happens when waiting from input from the user. See |undo-blocks|. "entries" A list of dictionaries with information about undo blocks. The first item in the "entries" list is the oldest undo item. Each List item is a |Dictionary| with these items: "seq" Undo sequence number. Same as what appears in |:undolist|. "time" Timestamp when the change happened. Use |strftime()| to convert to something readable. "newhead" Only appears in the item that is the last one that was added. This marks the last change and where further changes will be added. "curhead" Only appears in the item that is the last one that was undone. This marks the current position in the undo tree, the block that will be used by a redo command. When nothing was undone after the last change this item will not appear anywhere. "save" Only appears on the last block before a file write. The number is the write count. The first write has number 1, the last one the "save_last" mentioned above. "alt" Alternate entry. This is again a List of undo blocks. Each item may again have an "alt" item.

Returns

Promise<unknown>