mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-22 07:04:45 +00:00
Instead of calling execAction() and then letting it check whether it should actually execute this action, do this check before calling execAction(), to make the code clear and straightforward. Precisely: for multicursor actions, call execAction() in a loop for every cursor, but for non-multicursor actions, call execAction() just once, without a loop. This, in particular, allows to get rid of the hacky "c == nil" check, since we no longer iterate a slice that may change in the meantime (since SpawnMultiCursor and RemoveMultiCursor are non-multicursor actions and thus are no longer executed while iterating the slice). |
||
|---|---|---|
| .. | ||
| action | ||
| buffer | ||
| clipboard | ||
| config | ||
| display | ||
| info | ||
| lua | ||
| screen | ||
| shell | ||
| util | ||
| views | ||