title: why does this vimscript print more than it should?
body: <p>Here is the code:</p>
  
  <pre><code>function! test()
  python &lt;&lt; endpy
  import vim
  buf = vim.current.buffer
  (row1, col1) = buf.mark('&lt;')
  (row2, col2) = buf.mark('&gt;')
  for i in range(row1, row2+1):
      print i
  endpy
  endfunction
  </code></pre>
  
  <p>If you do <code>so %</code> and then <code>ggVG</code>, <code>:call test()</code>, you will see it prints from 1 to 10 many times. Why?</p>