Canceling part of the action

I would like to suggest one interesting improvement: the cancellation of the action in parts. for example, the user draws a long line and at the end the hand breaks. It would seem that it is necessary to either delete (cancel) the line completely or erase part of it with an eraser. I propose to cancel part of the action (it can be implemented as a record of the action in the form of a layer or in vector form and split into several parts)