Mercurial > vim
view runtime/compiler/ocaml.vim @ 33488:0081ca43bee9 v9.0.1995
patch 9.0.1995: Invalid memory access with empty 'foldexpr'
Commit: https://github.com/vim/vim/commit/a991ce9c083bb8c02b1b1ec34ed35728197050f3
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri Oct 6 19:16:36 2023 +0200
patch 9.0.1995: Invalid memory access with empty 'foldexpr'
Problem: Invalid memory access when 'foldexpr' returns empty string.
Solution: Check for NUL.
closes: #13293
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 06 Oct 2023 19:30:07 +0200 |
parents | 15fa3923cc49 |
children | e1df51f68736 |
line wrap: on
line source
" Vim Compiler File " Compiler: ocaml " Maintainer: Markus Mottl <markus.mottl@gmail.com> " URL: https://github.com/ocaml/vim-ocaml " Last Change: " 2020 Mar 28 - Improved error format (Thomas Leonard) " 2017 Nov 26 - Improved error format (Markus Mottl) " 2013 Aug 27 - Added a new OCaml error format (Markus Mottl) " " Marc Weber's comments: " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt, " ocamake and whatnot. So which one to use? " " This error format was moved from ftplugin/ocaml.vim to this file, " because ftplugin is the wrong file to set an error format " and the error format itself is annoying because it joins many lines in this " error case: " " Error: The implementation foo.ml does not match the interface foo.cmi: " Modules do not match case. " " So having it here makes people opt-in if exists("current_compiler") finish endif let current_compiler = "ocaml" let s:cpo_save = &cpo set cpo&vim CompilerSet errorformat = \%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:, \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#, \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, \%+EReference\ to\ unbound\ regexp\ name\ %m, \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, \%Wocamlyacc:\ w\ -\ %m, \%-Zmake%.%#, \%C%m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%D%*\\a:\ Entering\ directory\ `%f', \%X%*\\a:\ Leaving\ directory\ `%f', \%D%*\\a[%*\\d]:\ Entering\ directory\ '%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f', \%D%*\\a:\ Entering\ directory\ '%f', \%X%*\\a:\ Leaving\ directory\ '%f', \%DEntering\ directory\ '%f', \%XLeaving\ directory\ '%f', \%DMaking\ %*\\a\ in\ %f let &cpo = s:cpo_save unlet s:cpo_save