#include <gtk/gtk.h>

const gchar *longline = "asdasdas dsaf asfd as fdasdf asfd asdf as dfas dfasdf a\
asd fasdf asdf asdf asd fasfd €€€€as fdasfd asdf as fdas ffsd asfd as fdASASASAs As\
Asfdsf sdfg sdfg dsfg dfg sdfgsdfgsdfgsdfg sdfgsdfg sdfg sdfg sdf gsdfg sdfg sd\
asd fasdf asdf asdf asd fasfd aàààààs fdasfd asdf as fdas ffsd asfd as fdASASASAs D \
Asfdsf sdfg sdfg dsfg dfg sdfgsdfgsdfgsdfg sdfgsdfg sdf sdfg sdf gsdfg sdfg sd\
asd fasdf asdf asdf asd fasfèèèèd as fdasfd as as fdas ffsd asfd as fdASASASAs D \
Asfdsf sdfg sdfg dsfg dfg sdfgsdfgsdfgsdfg sdfgsg sdfg sdfg sdf gsdfg sdfg sd\
asd fasdf asdf asdf asd fa€€€€sfd asèè fdasfd asdf as fdas ffsd asfd as fdASASASAs D \
Asfdsf sdfg sdfg dsfg dfg sdfgsdfgsdfgsdfg sdfgsdfg sdfg sdfg sdf gsdfg sdfg sd\
\n\nlalala\n";

int
main (int argc, char **argv)
{
  GtkTextBuffer *buffer;
  int i;
  GtkTextIter start;

  gtk_init (&argc, &argv);

  buffer = gtk_text_buffer_new (NULL);

  gtk_text_buffer_set_text (buffer, longline, -1);

  gtk_text_buffer_get_start_iter (buffer, &start);

  for (i = 0; i < 500000 ; ++i)
    {
      GtkTextIter iter = start;

      if (argc == 2)
        gtk_text_iter_set_line_index (&iter, 100);
      else
        gtk_text_iter_set_visible_line_index (&iter, 100);
    }

  return 0;
}

