title: insert comment / undo failing in gtksourceview
body: <p>I've just stumbled upon a subtle problem with my insert comment and undo functions. Steps to reproduce:</p>
  
  <ol>
  <li>open editor</li>
  <li>insert comment somewhere in the sourcebuffer</li>
  <li>hit ctrl+z to undo</li>
  <li><p>insert another comment, the comment is inserted ok, but the following error shows up in the stdout:</p>
  
  <p>GtkSourceView-CRITICAL **: modified_changed_handler: assertion `action != NULL' failed</p></li>
  <li><p>insert another comment, which also works</p></li>
  <li><p>try to undo by hitting ctrl+z, undo does not work, and the following error shows up in stdout:</p>
  
  <p>GtkSourceView-CRITICAL **: gtk_source_undo_manager_undo_impl: assertion `undo_action != NULL' failed</p></li>
  </ol>
  
  <p>From here on undo does not work.</p>
  
  <p>Here is my insert_comment():</p>
  
  <pre><code>    ...
  tbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(txtinput[current_tab]));
  gtk_text_buffer_get_selection_bounds (tbuffer, &amp;start, &amp;end);
  
  gtk_text_iter_set_line_offset (&amp;start, 0);
  gtk_text_buffer_insert (tbuffer, &amp;start, "// \0", -1);
      ...
  </code></pre>
  
  <p>and my undo keypress definition:</p>
  
  <pre><code>    case GDK_KEY_z:
          if (event -&gt; state &amp; GDK_CONTROL_MASK)
          {
  
              GtkSourceBuffer *sbuffer;
  
              sbuffer = GTK_SOURCE_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(txtinput[current_tab])));
  
              if (gtk_source_buffer_can_undo(sbuffer))
              {
                  gtk_source_buffer_undo(sbuffer);
              }
  
              return TRUE;
          }
  
          break;
  </code></pre>
  
  <p>I saw one other person who had this same problem, but no solution was presented.  Has anyone else had this problem?</p>
  
  <p>I tried commenting out the "modified-changed" signal connection as a troubleshooting step, but the problem persists. </p>
  
  <p>Any ideas on what I might be doing wrong?  Thanks.</p>