comparison runtime/doc/builtin.txt @ 32732:257ab4ee8e4a v9.0.1686

patch 9.0.1686: undotree() only works for the current buffer Commit: https://github.com/vim/vim/commit/5fee11114975b7405b7ccd3ee8758e54bf559760 Author: Devin J. Pohly <djpohly@gmail.com> Date: Sun Apr 23 20:26:59 2023 -0500 patch 9.0.1686: undotree() only works for the current buffer 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>
author Christian Brabandt <cb@256bit.org>
date Fri, 11 Aug 2023 23:00:05 +0200
parents f970e6f29e7d
children 05188ca69e43
comparison
equal deleted inserted replaced
32731:755e32434239 32732:257ab4ee8e4a
705 String trim characters in {mask} from {text} 705 String trim characters in {mask} from {text}
706 trunc({expr}) Float truncate Float {expr} 706 trunc({expr}) Float truncate Float {expr}
707 type({expr}) Number type of value {expr} 707 type({expr}) Number type of value {expr}
708 typename({expr}) String representation of the type of {expr} 708 typename({expr}) String representation of the type of {expr}
709 undofile({name}) String undo file name for {name} 709 undofile({name}) String undo file name for {name}
710 undotree() List undo file tree 710 undotree([{buf}]) List undo file tree for buffer {buf}
711 uniq({list} [, {func} [, {dict}]]) 711 uniq({list} [, {func} [, {dict}]])
712 List remove adjacent duplicates from a list 712 List remove adjacent duplicates from a list
713 utf16idx({string}, {idx} [, {countcc} [, {charidx}]]) 713 utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
714 Number UTF-16 index of byte {idx} in {string} 714 Number UTF-16 index of byte {idx} in {string}
715 values({dict}) List values in {dict} 715 values({dict}) List values in {dict}
10071 returns an empty string. 10071 returns an empty string.
10072 10072
10073 Can also be used as a |method|: > 10073 Can also be used as a |method|: >
10074 GetFilename()->undofile() 10074 GetFilename()->undofile()
10075 10075
10076 undotree() *undotree()* 10076 undotree([{buf}]) *undotree()*
10077 Return the current state of the undo tree in a dictionary with 10077 Return the current state of the undo tree for the current
10078 the following items: 10078 buffer, or for a specific buffer if {buf} is given. The
10079 result is a dictionary with the following items:
10079 "seq_last" The highest undo sequence number used. 10080 "seq_last" The highest undo sequence number used.
10080 "seq_cur" The sequence number of the current position in 10081 "seq_cur" The sequence number of the current position in
10081 the undo tree. This differs from "seq_last" 10082 the undo tree. This differs from "seq_last"
10082 when some changes were undone. 10083 when some changes were undone.
10083 "time_cur" Time last used for |:earlier| and related 10084 "time_cur" Time last used for |:earlier| and related