Commit Graph

3 Commits

Author SHA1 Message Date
Guldoman cf29a6a45f
Allow command predicates to manage parameters passed to the commands
When a command is performed with parameters, those are now passed to the
predicate.
The predicate can then return, after the validity boolean, any other
value that will then be passed to the actual command.
If the predicate only returns the validity boolean, the original
parameters are passed through to the actual command.

This allows predicates to manipulate the received parameters, and allows
them to pass the result of an expensive computation to the actual
command, which won't have to recalculate it.

String and table predicates will now also return `core.active_view`.
2022-08-16 22:13:16 +02:00
jgmdev e070dbebc1 Fix undeclared NagView findindex() by moving it to common. 2021-06-13 21:28:29 -04:00
Takase 0fd1fa8872
Commands refactor (#257)
* remove unecessary check

* move command registration to core/commands
2021-06-07 23:00:29 +02:00