1

I want to write a gedit plugin that creates a shortcut to go to the last edit location. Therefore I wonder how to get this location in (py)GTK/gedit.

Edit: accessing the view (GtkSourceView) or the document (GtkSourceBuffer) is not a problem.

Mark Hurd
  • 10,665
  • 10
  • 68
  • 101
Jens Nyman
  • 1,186
  • 2
  • 14
  • 16
  • What do you mean by "last edit location". Where the cursor is? Where something was most recently inserted or deleted? Or something else? – ergosys Feb 25 '12 at 18:56
  • I mean the place where "undo" would affect the document --> where something was most recently inserted or deleted – Jens Nyman Feb 25 '12 at 22:59
  • This question is really two parts: how to get the gtksourceview object from a plugin, and then how to track the last edit location in a gtksourceview. For the former, see http://stackoverflow.com/q/2283933 For the later, you should google or ask on SO about gtksourceview (or gtktextview, its super-class) to find the answer. – ergosys Feb 26 '12 at 00:37

0 Answers0