greyblake / vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
GNU General Public License v2.0
209 stars 29 forks source link

Errors during `Preview` mess up Vim layout #35

Open blueyed opened 10 years ago

blueyed commented 10 years ago

I have noticed that :Preview with a `.rst. file can cause (multiple) lines of errors, e.g.

<string>:11: (ERROR/3) Error in "code" directive:
                                             maximum 1 argument(s) allowed, 3 supplied.

                                                                                       .. code:: sh
                                                                                                      make docker_build

After this, the Vim (terminal) window is a bit messed up, where the buffer line numbers do not match the actual content anymore. :redraw won't fix it, but :!reset.

It seems like this is caused because the rst2html command gets called in a special way by the plugin and/or ruby gem?!

A simple test.rst file that should produce an error:

.. code:: sh invalid
foo
zhsj commented 10 years ago

Mess-up layout also happens to me! For example, After I press -p to open browser, the cursor goes to the status line. 2014-08-05 21 27 53 When I move the cursor to text, there are double lines and the status line messes up too. 2014-08-05 21 28 18