I've just been reading over the last scene of Nahum Tate's revised version of Shakespeare's King Lear. I couldn't help myself; I had to find out how Tate contrives to leave Lear alive and Cordelia married to Edgar.
The scene starts with Lear and Cordelia in prison. Lear is asleep. Cordelia makes a moving speech - it's best not to dwell on what, precisely, gets moved by Cordelia's impassioned words. As soon as she finishes speaking, a "Captain and Officers" enter with Cords. The Captain gives his officers these sinister instructions:
Now, Sirs, dispatch, already you are paid
In part, the best of your Reward's to come.
After a short verbal and physical fracas, Lear shows that he is still sprightly for his age; he
Snatches a Partizan, and strikes down two of them; the rest quit Cordelia, and turn upon him. Enter Edgar and Albany.
(A partizan is a medieval weapon similar to a halberd - I think).
With two of the murderous officers out for the count, Edgar reveals that the Duke of Albany is now in charge. An anonymous gentleman helpfully informs the audience of the fate of the two "officers" struck down by Lear's partizan:
Look here, my Lord, see where the generous King
Has slain Two of 'em.
Albany still has some important business of state to conduct, for which he requires witnesses. So he gives the following orders:
Bring in old Kent, and, Edgar, guide you hither
Your Father, whom you said was near,
He may be an Ear-witness at the least
Of our Proceedings.
Once the witnesses are assembled, Albany gives Lear back his kingdom. Well, most of it anyway:
For to your Majesty we do Resign
Your Kingdom, save what Part your Self conferr'd
On Us in Marriage.
Edgar reveals that Goneril and Regan are both dead:
Gonerill and haughty Regan, both are Dead, 
Each by the other poison'd at a Banquet;
This, Dying, they confest.
And yes, Edgar does get the girl (Cordelia), with her father's blessing:
... Edgar, I defer thy Joys too long:
Thou serv'dst distrest Cordelia; take her Crown'd:
Th' imperial Grace fresh Blooming on her Brow;
I just love a happy ending, don't you?