From 321cf83fba85c70d0bdc89a07e8af4148127f23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 26 Oct 2015 19:57:54 +0100 Subject: vis: introduce pseudo operators for put In principle put is not really an operator, however it still should be repeatable and respect count. --- vis.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'vis.h') diff --git a/vis.h b/vis.h index d6e5546..dee4072 100644 --- a/vis.h +++ b/vis.h @@ -128,11 +128,16 @@ void vis_mode_set(Vis*, Mode*); bool vis_action_register(Vis*, KeyAction*); +/* TODO: overhaul repeatable infrastructure: + * - put is not really an operator, but should still be repeatable + * and respect count + " - review OP_REPEAT_{REPLACE,INSERT} + */ enum VisOperator { OP_DELETE, OP_CHANGE, OP_YANK, - OP_PUT, + OP_PUT_AFTER, OP_SHIFT_RIGHT, OP_SHIFT_LEFT, OP_JOIN, @@ -144,18 +149,9 @@ enum VisOperator { OP_CASE_LOWER, OP_CASE_UPPER, OP_CURSOR_EOL, -}; - -/* TODO: overhaul repeatable infrastructure: - * - put is not really an operator, but should still be repeatable - * and respect count - " - review OP_REPEAT_{REPLACE,INSERT} - */ -enum { - PUT_AFTER, - PUT_AFTER_END, - PUT_BEFORE, - PUT_BEFORE_END, + OP_PUT_AFTER_END, + OP_PUT_BEFORE, + OP_PUT_BEFORE_END, }; bool vis_operator(Vis*, enum VisOperator); -- cgit v1.2.3