Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dpelle
Copy link
Member

@dpelle dpelle commented Mar 20, 2017

This PR improves test coverage of the fold feature.

While writing the tests, I found something unclear
about the behavior of the ":folddoclosed" command
with a range.

If I run:

$ vim -u NONE \
   -c 'call setline(1, range(1, 6))' \
   -c '3,5 fold' \
   -c '2,4 folddoclosed s/$/ CLOSED/'

What should line 5 contain?

It currently contains "5 CLOSED" despite giving
the range 2,4 to the folddoclosed command.
Reading the ":help folddoclosed", I would have
expected line 5 to contain "5" instead of "5 CLOSED".

Is this a bug? If not, the doc is unclear.
It looks like folddoclosed with a range applies
the command to all lines in closed folds that
overlap with the range, and not all lines in the
range.

Since I don't know the expected behavior, for now I
did not test folddoclosed with a closed fold that partially
overlaps the range.

@brammool brammool closed this in 518c9b1 Mar 21, 2017
@brammool
Copy link
Contributor

brammool commented Mar 21, 2017 via email

chrisbra pushed a commit to chrisbra/vim that referenced this pull request Mar 25, 2017
Problem:    Insufficient testing for folding.
Solution:   Add a couple more fold tests. (Dominique Pelle, closes vim#1579)
chrisbra pushed a commit to chrisbra/vim that referenced this pull request Mar 28, 2017
Problem:    Insufficient testing for folding.
Solution:   Add a couple more fold tests. (Dominique Pelle, closes vim#1579)
desvp pushed a commit to desvp/vim that referenced this pull request May 30, 2017
Problem:    Insufficient testing for folding.
Solution:   Add a couple more fold tests. (Dominique Pelle, closes vim#1579)
justinmk pushed a commit to neovim/neovim that referenced this pull request May 26, 2018
Problem:    Insufficient testing for folding.
Solution:   Add a couple more fold tests. (Dominique Pelle, closes vim/vim#1579)
vim/vim@518c9b1
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.

2 participants