Mercurial > vim
annotate runtime/syntax/kivy.vim @ 33791:370543108ba1 v9.0.2114
patch 9.0.2114: overflow detection not accurate when adding digits
Commit: https://github.com/vim/vim/commit/22cbc8a4e17ce61aa460c451a26e1bff2c3d2af9
Author: Christian Brabandt <cb@256bit.org>
Date: Sun Nov 19 10:47:21 2023 +0100
patch 9.0.2114: overflow detection not accurate when adding digits
Problem: overflow detection not accurate when adding digits
Solution: Use a helper function
Use a helper function to better detect overflows before adding integer
digits to a long or an integer variable respectively. Signal the
overflow to the caller function.
closes: #13539
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 19 Nov 2023 11:00:07 +0100 |
parents | 92751673cc37 |
children | 4d6aa0d97b35 |
rev | line source |
---|---|
5968 | 1 " Vim syntax file |
2 " Language: Kivy | |
3 " Maintainer: Corey Prophitt <prophitt.corey@gmail.com> | |
4 " Last Change: May 29th, 2014 | |
5 " Version: 1 | |
6 " URL: http://kivy.org/ | |
7 | |
8 if exists("b:current_syntax") | |
9 finish | |
10 endif | |
11 | |
12 " Load Python syntax first (Python can be used within Kivy) | |
13 syn include @pyth $VIMRUNTIME/syntax/python.vim | |
14 | |
15 " Kivy language rules can be found here | |
16 " http://kivy.org/docs/guide/lang.html | |
17 | |
18 " Define Kivy syntax | |
19 syn match kivyPreProc /#:.*/ | |
20 syn match kivyComment /#.*/ | |
21 syn match kivyRule /<\I\i*\(,\s*\I\i*\)*>:/ | |
22 syn match kivyAttribute /\<\I\i*\>/ nextgroup=kivyValue | |
23 | |
24 syn region kivyValue start=":" end=/$/ contains=@pyth skipwhite | |
25 | |
26 syn region kivyAttribute matchgroup=kivyIdent start=/[\a_][\a\d_]*:/ end=/$/ contains=@pyth skipwhite | |
27 | |
28 hi def link kivyPreproc PreProc | |
29 hi def link kivyComment Comment | |
30 hi def link kivyRule Function | |
31 hi def link kivyIdent Statement | |
32 hi def link kivyAttribute Label | |
33 | |
34 let b:current_syntax = "kivy" | |
35 | |
36 " vim: ts=8 |