SynEdit: Fixed crash with certain chars. Issue #0022926. Certain chars were handled as "combining Marks". Introduced in rev 38669 #069b89f42f

git-svn-id: trunk@38827 -
This commit is contained in:
martin 2012-09-25 11:49:48 +00:00
parent 1b807141b9
commit 4ee95d2f5b

View File

@ -826,32 +826,23 @@ begin
PWidths^ := 0; PWidths^ := 0;
#$CC: #$CC:
if ((Line+1)^ in [#$80..#$FF]) and (i>0) if ((Line+1)^ in [#$80..#$FF]) and (i>0)
then PWidths^ := 0 // Combining Diacritical Marks (belongs to previos char) then PWidths^ := 0 // Combining Diacritical Marks (belongs to previos char) 0300-036F
else PWidths^ := 1; else PWidths^ := 1;
#$CD: #$CD:
if ((Line+1)^ in [#$00..#$AF]) and (i>0) if ((Line+1)^ in [#$00..#$AF]) and (i>0)
then PWidths^ := 0 // Combining Diacritical Marks then PWidths^ := 0 // Combining Diacritical Marks
else PWidths^ := 1; else PWidths^ := 1;
#$E1: #$E1:
if ( (((Line+1)^ = #$B7) and ((Line+2)^ in [#$80..#$FF])) if (((Line+1)^ = #$B7) and ((Line+2)^ in [#$80..#$BF])) and (i>0)
or ((Line+1)^ in [#$B8..#$B9]) then PWidths^ := 0 // Combining Diacritical Marks Supplement 1DC0-1DFF
or (((Line+1)^ = #$BA) and ((Line+2)^ in [#$80..#$BF]))
) and (i>0)
then PWidths^ := 0 // Combining Diacritical Marks Supplement
else PWidths^ := 1; else PWidths^ := 1;
#$E2: #$E2:
if ( (((Line+1)^ = #$83) and ((Line+2)^ in [#$90..#$FF])) if (((Line+1)^ = #$83) and ((Line+2)^ in [#$90..#$FF])) and (i>0)
or ((Line+1)^ in [#$84..#$86]) then PWidths^ := 0 // Combining Diacritical Marks for Symbols 20D0-20FF
or (((Line+1)^ = #$87) and ((Line+2)^ in [#$80..#$8F]))
) and (i>0)
then PWidths^ := 0 // Combining Diacritical Marks for Symbols
else PWidths^ := 1; else PWidths^ := 1;
#$EF: #$EF:
if ( (((Line+1)^ = #$B8) and ((Line+2)^ in [#$A0..#$FF])) if (((Line+1)^ = #$B8) and ((Line+2)^ in [#$A0..#$AF])) and (i>0)
or ((Line+1)^ in [#$B9..#$BB]) then PWidths^ := 0 // Combining half Marks FE20-FE2F
or (((Line+1)^ = #$BC) and ((Line+2)^ in [#$80..#$9F]))
) and (i>0)
then PWidths^ := 0 // Combining half Marks
else PWidths^ := 1; else PWidths^ := 1;
else else
PWidths^ := 1; PWidths^ := 1;