Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow undotree() to return tree for any buffer #12292

Closed
wants to merge 2 commits into from

Conversation

djpohly
Copy link
Contributor

@djpohly djpohly commented Apr 24, 2023

Problem: undotree() does not support getting the undo tree for any
buffer other than the current one.
Solution: Add an optional "buffer number" parameter to undotree(). If
omitted, use the current buffer for backwards compatibility.

Fixes #4001.

@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Merging #12292 (7de47ff) into master (5d01f86) will decrease coverage by 0.42%.
Report is 161 commits behind head on master.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master   #12292      +/-   ##
==========================================
- Coverage   82.08%   81.66%   -0.42%     
==========================================
  Files         160      160              
  Lines      193483   193659     +176     
  Branches    43446    43460      +14     
==========================================
- Hits       158812   158159     -653     
- Misses      21834    22687     +853     
+ Partials    12837    12813      -24     
Flag Coverage Δ
huge-clang-none 82.73% <88.88%> (-0.01%) ⬇️
linux 82.73% <88.88%> (-0.01%) ⬇️
mingw-x64-HUGE ?
mingw-x86-HUGE 77.09% <100.00%> (+0.05%) ⬆️
windows 77.09% <100.00%> (-1.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/evalfunc.c 90.15% <ø> (-0.01%) ⬇️
src/undo.c 75.83% <88.88%> (-0.04%) ⬇️

... and 81 files with indirect coverage changes

Problem:    undotree() does not support getting the undo tree for any
            buffer other than the current one.
Solution:   Add an optional "buffer number" parameter to undotree().  If
            omitted, use the current buffer for backwards compatibility.

Fixes vim#4001.
per @zeertzjq

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
@yegappan
Copy link
Member

Can you please update and rebase this PR to the latest?

@yegappan yegappan added this to the vim-9.1 milestone Aug 11, 2023
@chrisbra chrisbra closed this in 5fee111 Aug 11, 2023
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Aug 11, 2023
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: vim/vim#4001
closes: vim/vim#12292

vim/vim@5fee111

Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
zeertzjq added a commit to neovim/neovim that referenced this pull request Aug 11, 2023
)

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: vim/vim#4001
closes: vim/vim#12292

vim/vim@5fee111

Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
chrisbra pushed a commit to chrisbra/vim that referenced this pull request Sep 22, 2023
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: vim#4001
closes: vim#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

undotree() in context of another window
3 participants