Gtk.TextBuffer.prototype.select_range
function select_range(ins:Gtk.TextIter, bound:Gtk.TextIter):void { // Gjs wrapper for gtk_text_buffer_select_range() }
This function moves the "insert" and "selection_bound" marks simultaneously. If you move them in two steps with Gtk.TextBuffer.prototype.move_mark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.
Since 2.4
- ins
where to put the "insert" mark
- bound
where to put the "selection_bound" mark