Subject: Add duplicate-dwim [PATCH]

From: Mattias Engdegård <[email-masked]>
Date: Wed, 6 Jul 2022 10:29:29 +0200

This patch adds duplicate-swim, a command that works like duplicate-line but works on the region if active. It corresponds exactly to upcase-dwim, downcase-dwim and capitalize-dwim which have become quite popular.

Rectangular regions are treated specially by duplicating on the right-hand side. This behaviour turns out to be the most convenient one, and is also confluent with that of ordinary regions when the rectangle is only one line tall.