Mercurial > vim
annotate runtime/syntax/scdoc.vim @ 33868:25e5297fbc72 v9.0.2144
patch 9.0.2144: Text properties causes wrong line wrapping
Commit: https://github.com/vim/vim/commit/4e26a9aab6ad0ceb6bab0fd70e1031abb429f233
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Dec 3 17:50:47 2023 +0100
patch 9.0.2144: Text properties causes wrong line wrapping
Problem: Text properties causes wrong line wrapping to be drawn.
Solution: Find the index of the last text property that inserts text.
closes: #13611
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Dec 2023 15:16:08 +0100 |
parents | cd68a630f0d0 |
children |
rev | line source |
---|---|
25619 | 1 " Syntax file for scdoc files |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
2 " Maintainer: Gregory Anders <contact@gpanders.com> |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
3 " Last Updated: 2022-05-09 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
4 " Upstream: https://github.com/gpanders/vim-scdoc |
25619 | 5 |
6 if exists('b:current_syntax') | |
7 finish | |
8 endif | |
9 let b:current_syntax = 'scdoc' | |
10 | |
11 syntax match scdocFirstLineError "\%^.*$" | |
12 syntax match scdocFirstLineValid "\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$" | |
13 | |
14 syntax region scdocCommentError start="^;\S" end="$" keepend | |
15 syntax region scdocComment start="^; " end="$" keepend | |
16 | |
17 syntax region scdocHeaderError start="^#\{3,}" end="$" keepend | |
18 syntax region scdocHeader start="^#\{1,2}" end="$" keepend | |
19 | |
20 syntax match scdocIndentError "^[ ]\+" | |
21 | |
22 syntax match scdocLineBreak "++$" | |
23 | |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
24 syntax region scdocOrderedListItem matchgroup=scdocOrderedListMarker start="^\z(\s*\)\." skip="^\z1 .*$" end="^" contains=scdocBold,scdocUnderline |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
25 syntax region scdocListItem matchgroup=scdocListMarker start="^\z(\s*\)-" skip="^\z1 .*$" end="^" contains=scdocBold,scdocUnderline |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
26 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
27 " Tables cannot start with a column |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
28 syntax match scdocTableError "^:" |
25619 | 29 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
30 syntax region scdocTable matchgroup=scdocTableEntry start="^[\[|\]][\[\-\]<=>]" end="^$" contains=scdocTableEntry,scdocTableError,scdocTableContinuation,scdocBold,scdocUnderline,scdocPre |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
31 syntax match scdocTableError "^.*$" contained |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
32 syntax match scdocTableContinuation "^ \+\S\+" contained |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
33 syntax match scdocTableEntry "^[|:][\[\-\]<=> ]" contained |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
34 syntax match scdocTableError "^[|:][\[\-\]<=> ]\S.*$" contained |
25619 | 35 |
36 syntax region scdocBold concealends matchgroup=scdocBoldDelimiter start="\\\@<!\*" end="\\\@<!\*" | |
37 syntax region scdocUnderline concealends matchgroup=scdocUnderlineDelimiter start="\<\\\@<!_" end="\\\@<!_\>" | |
38 syntax region scdocPre matchgroup=scdocPreDelimiter start="^\t*```" end="^\t*```" | |
39 | |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
40 syntax sync minlines=50 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
41 |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
42 hi default link scdocFirstLineValid Comment |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
43 hi default link scdocComment Comment |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
44 hi default link scdocHeader Title |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
45 hi default link scdocOrderedListMarker Statement |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
46 hi default link scdocListMarker scdocOrderedListMarker |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
47 hi default link scdocLineBreak Special |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
48 hi default link scdocTableSpecifier Statement |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
49 hi default link scdocTableEntry Statement |
25619 | 50 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
51 hi default link scdocFirstLineError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
52 hi default link scdocCommentError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
53 hi default link scdocHeaderError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
54 hi default link scdocIndentError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
55 hi default link scdocTableError Error |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
56 hi default link scdocTableError Error |
25619 | 57 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
58 hi default link scdocPreDelimiter Delimiter |
25619 | 59 |
28843
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
60 hi default scdocBold term=bold cterm=bold gui=bold |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
61 hi default scdocUnderline term=underline cterm=underline gui=underline |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
62 hi default link scdocBoldDelimiter scdocBold |
cd68a630f0d0
Update runtime files and translations
Bram Moolenaar <Bram@vim.org>
parents:
25619
diff
changeset
|
63 hi default link scdocUnderlineDelimiter scdocUnderline |