made duplicate-line work properly when a region is active