# HG changeset patch # User Christian Brabandt # Date 1721547013 -7200 # Node ID 31b224083517815cb2320d21c5ba0f81caf6cabb # Parent 8ea2151d1ed8a3b6d61568ad6604381341ce2796 runtime(mysql): update syntax script Commit: https://github.com/vim/vim/commit/6e37575760022be047cad0e1cf1e30c18fab21ad Author: Yinzuo Jiang Date: Sun Jul 21 09:27:27 2024 +0200 runtime(mysql): update syntax script Problem: - `syn region ...`s in syntax/mysql.vim match function names inaccurately. - no syntax rules for mysql window function. - coarse highlight definition in syntax/mysql.vim. Solution: - add `\<` before the function name for accuracy. - add syntax rules for mysql window function. - enhance the highlight definition. closes: #15311 Signed-off-by: Yinzuo Jiang Signed-off-by: Christian Brabandt diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim --- a/runtime/syntax/mysql.vim +++ b/runtime/syntax/mysql.vim @@ -1,10 +1,13 @@ " Vim syntax file " Language: mysql " Maintainer: Kenneth J. Pronovici -" Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $ " Filenames: *.mysql -" URL: ftp://cedar-solutions.com/software/mysql.vim -" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 +" URL: ftp://cedar-solutions.com/software/mysql.vim (https://github.com/pronovic/vim-syntax/blob/master/mysql.vim) +" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 and have been updated +" in July 2024 with the docs for version 8.4 +" Last Change: 2016 Apr 11 +" 2024-07-21: update MySQL functions as of MySQL 8.4 (by Vim Project) +" " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -92,23 +95,23 @@ syn keyword mysqlType tinytex syn keyword mysqlType tinyblob mediumblob longblob blob syn region mysqlType start="float\W" end="."me=s-1 syn region mysqlType start="float$" end="."me=s-1 -syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="\