You can use the mark-set signal and in the signal handler check whether the moved mark is the "insert" mark.
Here is example code: http://git.0x539.de/?p=infinote.git;a=blob;f=libinftextgtk/inf-text-gtk-buffer.c;h=61c805f66b9d59ae91a4725532fae5b829fdd002;hb=HEAD#l1032 Cheers, Armin On Mon, 2013-03-25 at 20:49 +0100, dAgeCKo wrote: > Hello, > > I would like to know how to know when the cursor has moved inside a > TextView. > > I was looking for an answer to this question but the best thing I could > got is the signal cursor-move (in TextBuffer: > https://developer.gnome.org/gtk3/3.3/GtkTextView.html#GtkTextView-move-cursor) > > that one should not use. And anyway, trying to connect this signal > provided me with the error that this signal does not exist. > I also tried the signal_key_pressed (on the TextView), but it does not > capture the arrows. > > What I need is a mean to know each time the cursor has been moved (threw > the keyboard or threw the mouse) so that I can display the cursor > location (line+column), and to do other things (analyzing what is under > the cursor). > > Anyone has any idea about this ? > > Regards, > _______________________________________________ > gtkmm-list mailing list > [email protected] > https://mail.gnome.org/mailman/listinfo/gtkmm-list _______________________________________________ gtkmm-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/gtkmm-list
