From 47996e708ad2ab7e6a18633576c95e93d08e816a Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Thu, 1 Aug 2019 08:02:33 +0100 Subject: add crop-to-region in visual mode --- draw.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'draw.c') diff --git a/draw.c b/draw.c index 1e73719..ec44c2f 100644 --- a/draw.c +++ b/draw.c @@ -328,6 +328,13 @@ void visual_box(FILE *fc){ erase_blank_lines(MIN(y,orig_y), MAX(y, orig_y)); copy_lines_to_ring(MIN(orig_y, y), MAX(orig_y, y), NEW_STATE); + modified = 1; + goto vis_exit; + break; + case 'C':/* crop-to-region */ + copy_lines_to_ring(0, HEIGHT-1, PRV_STATE); + crop_to_rect(MIN(x, orig_x), MIN(y, orig_y), MAX(x, orig_x), MAX(y, orig_y)); + copy_lines_to_ring(0, HEIGHT-1, NEW_STATE); modified = 1; goto vis_exit; break; -- cgit v1.2.3