From b9d70d03550b33b40212c98251733e11a6b33ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 4 May 2016 09:34:50 +0200 Subject: vis: make j and k a linewise inclusive motion They behave like an inclusive motion, but only if they are also linewise (which they are by default). This should make `yjp` and `ykp` yank both the current and the next/previous line when the cursor is at the start of a line. See also 532f52e9e52b98dc5749396f7353295418e0227a and #237 --- vis-core.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index 08cf87b..6d3b35f 100644 --- a/vis-core.h +++ b/vis-core.h @@ -65,8 +65,9 @@ typedef struct { /* Motion implementation, takes a cursor postion and returns a LINEWISE = VIS_MOTIONTYPE_LINEWISE, /* should the covered range be extended to whole lines? */ CHARWISE = VIS_MOTIONTYPE_CHARWISE, /* scrolls window content until position is visible */ INCLUSIVE = 1 << 2, /* should new position be included in operator range? */ - IDEMPOTENT = 1 << 3, /* does the returned postion remain the same if called multiple times? */ - JUMP = 1 << 4, + LINEWISE_INCLUSIVE = 1 << 3, /* inclusive, but only if motion is linewise? */ + IDEMPOTENT = 1 << 4, /* does the returned postion remain the same if called multiple times? */ + JUMP = 1 << 5, /* should the resulting position of the motion be recorded in the jump list? */ } type; void *data; } Movement; -- cgit v1.2.3