summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Locke <kevin@kevinlocke.name>2021-06-25 21:54:25 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-25 21:54:25 +0200
commit6582e230a0f6592287b1123c5fc3807d6fed997e (patch)
treeca430707fc6c532faa2c2707d4ca71c5a9509387
parent22480d147fe83cb31316d2dabc5c5f249477af15 (diff)
downloadvim-git-6582e230a0f6592287b1123c5fc3807d6fed997e.tar.gz
patch 8.2.3049: JSON patch file not recognizedv8.2.3049
Problem: JSON patch file not recognized. Solution: Recognize json-patch as json. (Kevin Locke, closes #8450)
-rw-r--r--runtime/filetype.vim3
-rw-r--r--src/testdir/test_filetype.vim2
-rw-r--r--src/version.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 04e200117..496b58b31 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -855,6 +855,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" 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
index 0b670acf7..5c9c9753c 100644
--- 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
index 4cef712b6..36a3970d0 100644
--- 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,