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

Add terminal filtering and lastused to :ls (vim-patch:8.0.1651) #12155

Merged
merged 3 commits into from
Apr 27, 2020

Conversation

bobrippling
Copy link
Contributor

This was originally going to just be vim-patch 8.0.1651 (cannot filter :ls output for terminal buffers), however I spotted the last-used feature and decided to include it (patches 7.4.1988 & 8.1.2225).

7.4.1988 - this is a viminfo change, most of which is irrelevant. The patch has just been brought across / mentioned in spirit as it's the commit where I feel the creation and updating b_last_used still belong.

vim-patch:7.4.1988

Problem: When updating viminfo with file marks there is no time order.
Solution: Remember the time when a buffer was last used, store marks for
the most recently used buffers.
vim/vim@ab9c89b

vim-patch:8.0.1651: cannot filter :ls output for terminal buffers

Problem: Cannot filter :ls output for terminal buffers.
Solution: Add flags for terminal buffers. (Marcin Szamotulski, closes vim/vim#2751)
vim/vim@0751f51

vim-patch:8.1.2225: the "last used" info of a buffer is under used

Problem: The "last used" info of a buffer is under used.
Solution: Add "lastused" to getbufinfo(). List buffers sorted by last-used
field. (Andi Massimino, closes vim/vim#4722)
vim/vim@5241057

Problem:    When updating viminfo with file marks there is no time order.
Solution:   Remember the time when a buffer was last used, store marks for
            the most recently used buffers.
vim/vim@ab9c89b

As this is a viminfo fix, most of this is irrelevant - the patch has
just been brought across for the creation and updating of buffer's
`b_last_used` properties.
Problem:    Cannot filter :ls output for terminal buffers.
Solution:   Add flags for terminal buffers. (Marcin Szamotulski, closes vim/vim#2751)
vim/vim@0751f51
@marvim marvim added the vim-patch See https://neovim.io/doc/user/dev_vimpatch.html label Apr 19, 2020
@teto
Copy link
Member

teto commented Apr 19, 2020

Please prefix the PR with one of WIP/RFC/RDY . Seems like there are a few issues on CI so I guess WIP ? thanks for the PR

@bobrippling
Copy link
Contributor Author

Knew I'd forgot something! Yes, CI/test failures pending

@bobrippling bobrippling changed the title Add terminal filtering and lastused to :ls (vim-patch:8.0.1651) WIP: Add terminal filtering and lastused to :ls (vim-patch:8.0.1651) Apr 19, 2020
@bobrippling
Copy link
Contributor Author

bobrippling commented Apr 20, 2020

As part of fixing the tests, I either need to have the test wait for more than a second (to give the buffers different timestamps) or add in test_gettime() from vim. I gather that neovim tries to avoid having test_* functions available, are there any opinions on this?

Problem:    The "last used" info of a buffer is under used.
Solution:   Add "lastused" to getbufinfo(). List buffers sorted by last-used
            field. (Andi Massimino, closes vim/vim#4722)
vim/vim@5241057
@bobrippling bobrippling changed the title WIP: Add terminal filtering and lastused to :ls (vim-patch:8.0.1651) RFC: Add terminal filtering and lastused to :ls (vim-patch:8.0.1651) Apr 22, 2020
@bobrippling
Copy link
Contributor Author

I believe the failed tests (functional/terminal/scrollback_spec.lua, functional/ui/spell_spec.lua and functional/api/server_requests_spec.lua) are transient failures - is it possible to requeue those builds?

@janlazo
Copy link
Contributor

janlazo commented Apr 25, 2020

@bobrippling test_ functions that do not expose or override internal state are fine. Tests that rely on test_ functions for overriding internal state should be skipped and rewritten to a Lua unit/functional test.

@justinmk justinmk merged commit 34ad1ea into neovim:master Apr 27, 2020
@justinmk justinmk changed the title RFC: Add terminal filtering and lastused to :ls (vim-patch:8.0.1651) Add terminal filtering and lastused to :ls (vim-patch:8.0.1651) Apr 27, 2020
@bobrippling bobrippling deleted the buf-lastused branch April 27, 2020 17:28
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vim-patch See https://neovim.io/doc/user/dev_vimpatch.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants