Track Comment Editor - No Undo/Redo in text box

I have been bitten a few times by the track comment editor lacking undo/redo function. I have on a few occasions lost notes that I wish I could get back by doing things like accidentally highlighting more than one line and typing when I intended to highlight just one line, etc. etc. (I often write a yaml-ish formatted block of text for settings on outboard gear like guitar amplifiers that I can only control with human fingers).

I must admit, it’s a little startling at first that undo/redo doesn’t just work.

Is this a GTK provided class/primitive for this text area? Is there a technical reason why wiring up undo/redo is technically difficult here?

It’s a regular Gtk::TextView. It has no builtin undo/redo. Others have backported the mechanism from Gtk::SourceView but I suspect only for things newer than GTK2.

Would there be a tricky gotcha with the editor catching undo/redo shortcuts and also unwinding/redoing that undo/redo stack with these keystrokes or would you expect that when the Gtk::TextView has focus that the rest of the application would not catch these?

I see this instance in route_ui.h. I don’t know enough about the ardour application context and global undo/redo to know if one could simply find/backport/subclass Gtk::TextView with this functionality and drop it in here without significant global implications.

We don’t have global undo/redo. By specific intention, undo/redo applies only to modifications to the tlmeline (not the mixer, and not specific text editing widgets). We would not expect to use that mechanism (which is extremely generic) for text editing.

I have no idea how hard it would be, but my muscle memory would be delighted if there was a way for Ardour to kick down to my editor-of-choice (in my case, gvim -f) for any operation involving what would otherwise be handed off to a GTK “textarea” widget. In particular, I’d love to edit LUA scripts in my editor, with its knowledge of syntax highlighting, folding, etc.

Prolly only a benefit for a tiny minority of Ardour users, but, just in case, I thought I’d ask.


What about [Alt-Tab]? Should open up any editor that’s already open with your mixing notes template incl. timestamping, auto save etc. :wink: