Closed MaxGyver83 closed 11 months ago
Mappings are listed as being evaluated recursively in multiple places:
https://martanne.github.io/vis/man/vis.1.html#Runtime_key_mappings https://github.com/martanne/vis/wiki/FAQ#how-can-i-configure-custom-key-bindings
This is simple and easy to follow from a programming perspective. On the other hand detecting that a recursive mapping was made will make the code complex and ugly. I would be against any such change, especially since the manual specifically mentions that such mappings will cause an infinite loop and that you should use the special keys instead.
I see. Looks like I didn't pay attention to the word "recursively" in the man page and hadn't read the FAQ.
Obviously, this information is available. On the other hand, in other minimalistic/suckless software, even hard to reach crashes, memory leaks (and probably infinite loops) get fixed. But maybe this is not true for fixes that would add too many lines of code.
I have tried to swap
C-j
andC-k
(because of my custom keyboard layout). I tried:When I then started vis again and typed
<C-k>
, it didn't react anymore and the CPU load went to 100%. Maybe caused by an infinite loop?After looking through the issues, I found #750 and now I know that the correct way to swap the key bindings is:
But nevertheless, vis should print an error and stay usable in such a case.