Undo / redo functionality #6

Closed
opened 2018-04-18 15:02:03 +00:00 by matt · 3 comments
Owner

It'd be nice to be able to Ctrl+Z / Ctrl+Shift+Z to Undo/Redo changes, respectively.

It'd be nice to be able to Ctrl+Z / Ctrl+Shift+Z to Undo/Redo changes, respectively.
Collaborator

Yes, it most certainly would. Wouldn't be too hard to implement ourselves, or we could switch to adding a new dependency on gtksourceview so we can use it's implementation. But unfortunately it's not built-into core GTK.

Yes, it most certainly would. Wouldn't be too hard to implement ourselves, or we could switch to adding a new dependency on gtksourceview so we can use it's implementation. But unfortunately it's not built-into core GTK.
Collaborator

I think I'll add that extra dependency, it does add a lot of nicities to the Gtk.TextView.

I still don't think implementing undo/redo will be to hard to do myself, but I think you'll benefit from Gtk.SourceView. It's not all about adding syntax highlighting.

I think I'll add that extra dependency, it does add a lot of nicities to the Gtk.TextView. I still don't think implementing undo/redo will be to hard to do myself, but I think you'll benefit from Gtk.SourceView. It's not all about adding syntax highlighting.
Collaborator

Switched to using Gtk.SourceView over the Gtk.TextView superclass, and undo/redo is working very nicely.

So now any of the following won't be too hard:

  • syntax highlighting
  • autocompletion
  • search and replace
  • markable line numbers
  • printing
  • highlighting the current line
  • highlighting the matching bracket
  • drawing an 80-characters line mark or similar
  • illustrating which whitespace characters are present in selected text
  • a "minimap" (more useful for code than prose though)
Switched to using Gtk.SourceView over the Gtk.TextView superclass, and undo/redo is working very nicely. So now any of the following won't be too hard: * syntax highlighting * autocompletion * search and replace * markable line numbers * printing * highlighting the current line * highlighting the matching bracket * drawing an 80-characters line mark or similar * illustrating which whitespace characters are present in selected text * a "minimap" (more useful for code than prose though)
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: writeas/writeas-gtk#6
No description provided.