Wansmer / treesj

Neovim plugin for splitting/joining blocks of code
MIT License
1.04k stars 29 forks source link

Fix: usage in macros #145

Closed backdround closed 9 months ago

backdround commented 9 months ago

nvim_feedkeys should be used with the insert flag to be handled right in macros. Otherwise, these keys will be handled at the end of the macro, and the sequences of the keys will be broken.

You can check it by splitting or joining several nodes:

Then try to use the macro on the restored nodes or on a new pair of nodes with the same relative location.

Wansmer commented 9 months ago

That makes sense, thanks for the PR!