This website requires JavaScript.
Explore
Help
Sign In
xenia
/
kakoune
Watch
1
Star
0
Fork
0
You've already forked kakoune
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
4bb1f17928
kakoune
/
test
/
regression
/
4896-remap-executing-mapping
/
in
2 lines
1 B
Raw
Normal View
History
Unescape
Escape
map: fail if key is currently executing If during execution of a mapping, that same mapping is replaced, there is undefined behavior because we destroy a mapping that we are still iterating over. I have been using this mapping inside my kakrc to re-source the kakrc. map global user s %{:source "%val{config}/kakrc"<ret>} -docstring 'source "%val{config}/kakrc"' Now <space>s happens to not trigger undefined behavior because the mapping stays the same. However it triggers an assertion added by Commit e49c0fb04 (unmap: fail if the mapping is currently executing, 2023-05-14), specifically the destructor of ScopedSetBool that guards mapping execution. Fix these by banning map of a key that is executing, just like we did for unmap. Alternative solution: we could allow mapping (and even unmapping) keys at any time and keep them alive by moving them into a trash can, like we do for clients and others.
2023-06-24 19:49:02 +02:00
Reference in New Issue
Copy Permalink
Mastodon