diff options
author | Devin J. Pohly <djpohly@gmail.com> | 2023-04-23 20:26:59 -0500 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-08-11 22:53:39 +0200 |
commit | 5fee11114975b7405b7ccd3ee8758e54bf559760 (patch) | |
tree | ae15baf50b45d4c5ad76714641b03c006b1ac70d /runtime | |
parent | 422b9dcbfadcd5c1dfad982f9782563915398430 (diff) |
patch 9.0.1686: undotree() only works for the current bufferv9.0.1686
Problem: undotree() only works for the current buffer
Solution: Add an optional "buffer number" parameter to undotree(). If
omitted, use the current buffer for backwards compatibility.
closes: #4001
closes: #12292
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 9 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 1 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 34f76d6f4e..e74b39740e 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -707,7 +707,7 @@ trunc({expr}) Float truncate Float {expr} type({expr}) Number type of value {expr} typename({expr}) String representation of the type of {expr} undofile({name}) String undo file name for {name} -undotree() List undo file tree +undotree([{buf}]) List undo file tree for buffer {buf} uniq({list} [, {func} [, {dict}]]) List remove adjacent duplicates from a list utf16idx({string}, {idx} [, {countcc} [, {charidx}]]) @@ -10073,9 +10073,10 @@ undofile({name}) *undofile()* Can also be used as a |method|: > GetFilename()->undofile() -undotree() *undotree()* - Return the current state of the undo tree in a dictionary with - the following items: +undotree([{buf}]) *undotree()* + Return the current state of the undo tree for the current + buffer, or for a specific buffer if {buf} is given. The + result is 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" diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 60903f922e..93c19b5140 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -5535,7 +5535,6 @@ Undo: - Undo history wrong when ":next file" re-uses a buffer. (#5426) ex_next() should pass flag to do_argfile(), then to do_ecmd(). Is there a test for this? -- Add buffer argument to undotree(). (#4001) - Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18) - Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct 3. Doesn't work properly according to Yukihiro Nakadaira. diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 2d6792af47..2112fbb1b4 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1373,7 +1373,7 @@ Various: *various-functions* libcallnr() idem, returning a number undofile() get the name of the undo file - undotree() return the state of the undo tree + undotree() return the state of the undo tree for a buffer shiftwidth() effective value of 'shiftwidth' |