vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 24091cdb974ff107b3e5b981c4074cbca07c22c2 parent ab900feddd081a5da0e830bdf255b95868bce191 Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 9 Apr 2016 11:48:24 +0200 vis: make j an inclusive motion Given the following text with no trailing new line at the end of line2, where # denotes the cursor position: #ine1 of text line2 of text the command yjp should produce line1 of text #ine1 of text line2 of text line2 of text where previously it would wrongly result in line1 of text #ine1 of text line2 of text Diffstat:
| M | vis-motions.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vis-motions.c b/vis-motions.c @@ -331,7 +331,7 @@ err: const Movement vis_motions[] = { [VIS_MOVE_LINE_UP] = { .cur = view_line_up, .type = LINEWISE }, - [VIS_MOVE_LINE_DOWN] = { .cur = view_line_down, .type = LINEWISE }, + [VIS_MOVE_LINE_DOWN] = { .cur = view_line_down, .type = LINEWISE|INCLUSIVE }, [VIS_MOVE_SCREEN_LINE_UP] = { .cur = view_screenline_up, }, [VIS_MOVE_SCREEN_LINE_DOWN] = { .cur = view_screenline_down, }, [VIS_MOVE_SCREEN_LINE_BEGIN] = { .cur = view_screenline_begin, .type = CHARWISE },