# Sourceview cursor doesn't show

**URL:** <https://www.ruby-forum.com/t/sourceview-cursor-doesnt-show/114551>\
**Category:** Ruby-Gnome 2\
**Created:** [September 14, 2007, 9:50pm UTC](https://www.ruby-forum.com/t/sourceview-cursor-doesnt-show/114551 "2007-09-14T21:50:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alake](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@alake](https://www.ruby-forum.com/u/alake)\
**Post date:** [September 14, 2007, 9:50pm UTC](https://www.ruby-forum.com/t/sourceview-cursor-doesnt-show/114551/1 "2007-09-14T21:50:52Z")

</div>

In initializing a SourceBuffer, the cursor isn’t initially visible.  
I’ve created an EditView class which is intended to encapsulate parts of  
the following Gtk classes: Table, ScrolledWindow, GtkSourceView,  
SourceBuffer, Tag, Iter and Mark.  
The test initializes OK, except that the cursor doesn’t show and things  
like scroll\_to\_iter and scroll\_to\_mark do not scroll the screen until I  
have manually pressed an arrow key. It appears that the iters and marks  
are being positioned correctly because I can do a “find” operation. I’d  
just like to scroll the cursor into a viewable place and show it  
programmatically. (The cursor\_visible? method is true even when the  
cursor isn’t visible.) I think it must be buried somewhere and is  
brought to the top by the arrow key press.  
The attachment is actually two file concatenated together. First is the  
main.rb file, which includes the second file, editview.rb.
