diff --git a/Changelog.md b/Changelog.md
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,4 +1,4 @@
-### 0.1.2.1
+### 0.1.2.2
 
 - Added Cabal flag *debug* (off by default) for printing how vim runs to
   *stderr*.
diff --git a/pandoc-vimhl.cabal b/pandoc-vimhl.cabal
--- a/pandoc-vimhl.cabal
+++ b/pandoc-vimhl.cabal
@@ -1,5 +1,5 @@
 name:                pandoc-vimhl
-version:             0.1.2.1
+version:             0.1.2.2
 synopsis:            Pandoc filter for native Vim code highlighting
 description:         Pandoc filter for native Vim code highlighting in HTML and
         PDF documents. Requires Vim and plugin
diff --git a/vimhl.hs b/vimhl.hs
--- a/vimhl.hs
+++ b/vimhl.hs
@@ -77,6 +77,7 @@
                     (_, _, _, handle) <- createProcess (shell vimcmd)
                         {std_in = UseHandle hin, std_out = UseHandle hout}
                     r <- waitForProcess handle
+                    unless (r == ExitSuccess) $ exitWith r
 #ifdef DEBUG
                     hPutStrLn stderr "done"
 #endif
