diff options
author | KatolaZ <katolaz@freaknet.org> | 2019-08-01 08:02:33 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2019-08-01 08:02:33 +0100 |
commit | 47996e708ad2ab7e6a18633576c95e93d08e816a (patch) | |
tree | 466d6eebf592833f8f4e301ac60d1cff6769c2bf /draw.c | |
parent | 6d34f883ba3ce2474df90432cc4aa387e9093321 (diff) |
add crop-to-region in visual mode
Diffstat (limited to 'draw.c')
-rw-r--r-- | draw.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -331,6 +331,13 @@ void visual_box(FILE *fc){ 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; } check_bound(); set_video(VIDEO_NRM); |