In bash, press CTRL + _ to undo previous text edition.