# HG changeset patch # User Bram Moolenaar # Date 1624651205 -7200 # Node ID a1b0fe1c7cd57b8a9b63a322a6377a61bb6aec7a # Parent 681a896e37e3a0c73697ff6cc49d3d9ce17826ba patch 8.2.3049: JSON patch file not recognized Commit: https://github.com/vim/vim/commit/6582e230a0f6592287b1123c5fc3807d6fed997e Author: Kevin Locke Date: Fri Jun 25 21:54:25 2021 +0200 patch 8.2.3049: JSON patch file not recognized Problem: JSON patch file not recognized. Solution: Recognize json-patch as json. (Kevin Locke, closes https://github.com/vim/vim/issues/8450) diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -855,6 +855,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovi " JSON au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json +" JSON Patch (RFC 6902) +au BufNewFile,BufRead *.json-patch setf json + " Jupyter Notebook is also json au BufNewFile,BufRead *.ipynb setf json diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -257,7 +257,7 @@ let s:filename_checks = { \ 'jgraph': ['file.jgr'], \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'], \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'], - \ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb'], + \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb'], \ 'jsp': ['file.jsp'], \ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'], \ 'kivy': ['file.kv'], diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3049, +/**/ 3048, /**/ 3047,