ying17zi/vim-live-latex-preview — pull request #2 by nichtleiter (2012-05-18 23:19:20+00:00)
Title: resolve problem in LaunchMuPDF()

because vim's system() function returns not only stdout, but also stderr it is unreasonable only to redirect the stderr of 'wc' in 'mupdf-launch.sh' to '/dev/null'. It makes more sense to delete this redirection in 'mupdf-launch.sh' which makes debugging in those rare cases easier, in which wc writes to stderr. Instead i appended '2> /dev/null' in the corresponding system() call in LaunchMuPDF().

Maybe one may wonder of this commit, but without it, the script failed regularly on my machine.

In those cases, the variable "b:MuPDFWindowID" contained something like this:

X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 15 (X_QueryTree)
Resource id in failed request: 0x10cb8c9
Serial number of failed request: 2050
Current serial number in output stream: 2050
79691915

Most likely very annoying for those who wants to replace something so flawless like gummi with vim.