lambdalisue/vim-fern

[bug] node expansion inconsistent behaviour

brandon1024 opened this issue · 0 comments

I found a small quirk in how nodes are expanded/collapsed. I have some configuration that toggles expansion of a node or opens a leaf. This has stopped working correctly after updating the plugin.

	nmap <buffer> <CR> <Plug>(fern-action-toggle-expand-open)

	nmap <buffer><expr> <Plug>(fern-action-toggle-expand-open)
		\ fern#smart#leaf(
		\   "<Plug>(fern-action-open:select)",
		\   "<Plug>(fern-action-expand)",
		\   "<Plug>(fern-action-collapse)")

When I open Fern and expand a tree for the first time (with <CR>), it works as I would expect. After collapsing the node and expanding the tree again, the first child node is in the expanded state but doesn't render as such.

Here's a screen capture to demonstrate this behaviour. Notice the state of ews-eks when I expand it the second time:

Peek 2023-08-26 08-04

This was working correctly in cdec132 (Merge pull request #475 from lambdalisue/fix-viewer-auto-duplication, 2023-05-27), but stopped working after a rebase to d8c6698 (Merge pull request #484 from lambdalisue/fix-reveal, 2023-08-26).