Commit ce491748 authored by Victor Ananjevsky's avatar Victor Ananjevsky

place cursor at the beggining of a buffer when file is loaded in text-info dialog

parent de7bee2a
......@@ -579,6 +579,13 @@ fill_buffer_from_file ()
lang = gtk_source_language_manager_guess_language (gtk_source_language_manager_get_default (), options.common_data.uri, NULL);
gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (text_buffer), lang);
#endif
if (options.common_data.editable)
{
/* move cursor at the beginnging of a buffer */
gtk_text_buffer_get_iter_at_offset (GTK_TEXT_BUFFER (text_buffer), &iter, 0);
gtk_text_buffer_place_cursor (GTK_TEXT_BUFFER (text_buffer), &iter);
}
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment