I renamed some things, and I've decided to 'copy' the value of the text property of SegmentBuffer and copy it, allowing my code to work with a less volatile version. My Undo and Redo buttons actually do something now (although not in the way that I want them to).
More work on the test_edit script. It's helping me learn signals and state better.