• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision9096 (tree)
Zeit2007-03-31 17:50:46
Autorstefankueng

Log Message

Update the scintilla control to version 1.73.

Ändern Zusammenfassung

Diff

--- trunk/src/Utils/scintilla/delcvs.bat (revision 9095)
+++ trunk/src/Utils/scintilla/delcvs.bat (revision 9096)
@@ -1,9 +1 @@
1-rmdir /S /Q CVS
2-rmdir /S /Q bin\CVS
3-rmdir /S /Q doc\CVS
4-rmdir /S /Q gtk\CVS
5-rmdir /S /Q include\CVS
6-rmdir /S /Q src\CVS
7-rmdir /S /Q vcbuild\CVS
8-rmdir /S /Q win32\CVS
91 del /S /Q .cvsignore
--- trunk/src/Utils/scintilla/doc/ScintillaDoc.html (revision 9095)
+++ trunk/src/Utils/scintilla/doc/ScintillaDoc.html (revision 9096)
@@ -1970,33 +1970,46 @@
19701970 use style 0 for white space, style 1 for numbers, style 2 for keywords, style 3 for strings,
19711971 style 4 for preprocessor, style 5 for operators, and so on.</p>
19721972 <code><a class="message" href="#SCI_STYLERESETDEFAULT">SCI_STYLERESETDEFAULT</a><br />
1973- <a class="message" href="#SCI_STYLECLEARALL">SCI_STYLECLEARALL</a><br />
1974- <a class="message" href="#SCI_STYLESETFONT">SCI_STYLESETFONT(int styleNumber, char
1973+ <a class="message" href="#SCI_STYLECLEARALL">SCI_STYLECLEARALL</a><br />
1974+ <a class="message" href="#SCI_STYLESETFONT">SCI_STYLESETFONT(int styleNumber, char
19751975 *fontName)</a><br />
1976- <a class="message" href="#SCI_STYLESETSIZE">SCI_STYLESETSIZE(int styleNumber, int
1976+ <a class="message" href="#SCI_STYLEGETFONT">SCI_STYLEGETFONT(int styleNumber, char *fontName)</a><br />
1977+ <a class="message" href="#SCI_STYLESETSIZE">SCI_STYLESETSIZE(int styleNumber, int
19771978 sizeInPoints)</a><br />
1978- <a class="message" href="#SCI_STYLESETBOLD">SCI_STYLESETBOLD(int styleNumber, bool
1979+ <a class="message" href="#SCI_STYLEGETSIZE">SCI_STYLEGETSIZE(int styleNumber)</a><br />
1980+ <a class="message" href="#SCI_STYLESETBOLD">SCI_STYLESETBOLD(int styleNumber, bool
19791981 bold)</a><br />
1980- <a class="message" href="#SCI_STYLESETITALIC">SCI_STYLESETITALIC(int styleNumber, bool
1982+ <a class="message" href="#SCI_STYLEGETBOLD">SCI_STYLEGETBOLD(int styleNumber)</a><br />
1983+ <a class="message" href="#SCI_STYLESETITALIC">SCI_STYLESETITALIC(int styleNumber, bool
19811984 italic)</a><br />
1982- <a class="message" href="#SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int styleNumber, bool
1985+ <a class="message" href="#SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int styleNumber)</a><br />
1986+ <a class="message" href="#SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int styleNumber, bool
19831987 underline)</a><br />
1984- <a class="message" href="#SCI_STYLESETFORE">SCI_STYLESETFORE(int styleNumber, int
1988+ <a class="message" href="#SCI_STYLEGETUNDERLINE">SCI_STYLEGETUNDERLINE(int styleNumber)</a><br />
1989+ <a class="message" href="#SCI_STYLESETFORE">SCI_STYLESETFORE(int styleNumber, int
19851990 colour)</a><br />
1986- <a class="message" href="#SCI_STYLESETBACK">SCI_STYLESETBACK(int styleNumber, int
1991+ <a class="message" href="#SCI_STYLEGETFORE">SCI_STYLEGETFORE(int styleNumber)</a><br />
1992+ <a class="message" href="#SCI_STYLESETBACK">SCI_STYLESETBACK(int styleNumber, int
19871993 colour)</a><br />
1988- <a class="message" href="#SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int styleNumber, bool
1994+ <a class="message" href="#SCI_STYLEGETBACK">SCI_STYLESETBACK(int styleNumber)</a><br />
1995+ <a class="message" href="#SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int styleNumber, bool
19891996 eolFilled)</a><br />
1990- <a class="message" href="#SCI_STYLESETCHARACTERSET">SCI_STYLESETCHARACTERSET(int styleNumber,
1997+ <a class="message" href="#SCI_STYLEGETEOLFILLED">SCI_STYLEGETEOLFILLED(int styleNumber)</a><br />
1998+ <a class="message" href="#SCI_STYLESETCHARACTERSET">SCI_STYLESETCHARACTERSET(int styleNumber,
19911999 int charSet)</a><br />
1992- <a class="message" href="#SCI_STYLESETCASE">SCI_STYLESETCASE(int styleNumber, int
2000+ <a class="message" href="#SCI_STYLEGETCHARACTERSET">SCI_STYLEGETCHARACTERSET(int styleNumber)</a><br />
2001+ <a class="message" href="#SCI_STYLESETCASE">SCI_STYLESETCASE(int styleNumber, int
19932002 caseMode)</a><br />
1994- <a class="message" href="#SCI_STYLESETVISIBLE">SCI_STYLESETVISIBLE(int styleNumber, bool
2003+ <a class="message" href="#SCI_STYLEGETCASE">SCI_STYLEGETCASE(int styleNumber)</a><br />
2004+ <a class="message" href="#SCI_STYLESETVISIBLE">SCI_STYLESETVISIBLE(int styleNumber, bool
19952005 visible)</a><br />
1996- <a class="message" href="#SCI_STYLESETCHANGEABLE">SCI_STYLESETCHANGEABLE(int styleNumber, bool
2006+ <a class="message" href="#SCI_STYLEGETVISIBLE">SCI_STYLEGETVISIBLE(int styleNumber)</a><br />
2007+ <a class="message" href="#SCI_STYLESETCHANGEABLE">SCI_STYLESETCHANGEABLE(int styleNumber, bool
19972008 changeable)</a><br />
2009+ <a class="message" href="#SCI_STYLEGETCHANGEABLE">SCI_STYLEGETCHANGEABLE(int styleNumber)</a><br />
19982010 <a class="message" href="#SCI_STYLESETHOTSPOT">SCI_STYLESETHOTSPOT(int styleNumber, bool
19992011 hotspot)</a><br />
2012+ <a class="message" href="#SCI_STYLGSETHOTSPOT">SCI_STYLEGETHOTSPOT(int styleNumber)</a><br />
20002013 </code>
20012014
20022015 <p><b id="SCI_STYLERESETDEFAULT">SCI_STYLERESETDEFAULT</b><br />
@@ -2012,9 +2025,13 @@
20122025 3. Set the style attributes that make your lexical styles different.</p>
20132026
20142027 <p><b id="SCI_STYLESETFONT">SCI_STYLESETFONT(int styleNumber, const char *fontName)</b><br />
2015- <b id="SCI_STYLESETSIZE">SCI_STYLESETSIZE(int styleNumber, int sizeInPoints)</b><br />
2016- <b id="SCI_STYLESETBOLD">SCI_STYLESETBOLD(int styleNumber, bool bold)</b><br />
2017- <b id="SCI_STYLESETITALIC">SCI_STYLESETITALIC(int styleNumber, bool italic)</b><br />
2028+ <b id="SCI_STYLEGETFONT">SCI_STYLEGETFONT(int styleNumber, char *fontName)</b><br />
2029+ <b id="SCI_STYLESETSIZE">SCI_STYLESETSIZE(int styleNumber, int sizeInPoints)</b><br />
2030+ <b id="SCI_STYLEGETSIZE">SCI_STYLEGETSIZE(int styleNumber)</b><br />
2031+ <b id="SCI_STYLESETBOLD">SCI_STYLESETBOLD(int styleNumber, bool bold)</b><br />
2032+ <b id="SCI_STYLEGETBOLD">SCI_STYLEGETBOLD(int styleNumber)</b><br />
2033+ <b id="SCI_STYLESETITALIC">SCI_STYLESETITALIC(int styleNumber, bool italic)</b><br />
2034+ <b id="SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int styleNumber)</b><br />
20182035 These messages (plus <a class="message"
20192036 href="#SCI_STYLESETCHARACTERSET"><code>SCI_STYLESETCHARACTERSET</code></a>) set the font
20202037 attributes that are used to match the fonts you request to those available. The
@@ -2028,20 +2045,24 @@
20282045
20292046 <p><b id="SCI_STYLESETUNDERLINE">SCI_STYLESETUNDERLINE(int styleNumber, bool
20302047 underline)</b><br />
2031- You can set a style to be underlined. The underline is drawn in the foreground colour. All
2048+ <b id="SCI_STYLEGETUNDERLINE">SCI_STYLEGETUNDERLINE(int styleNumber)</b><br />
2049+ You can set a style to be underlined. The underline is drawn in the foreground colour. All
20322050 characters with a style that includes the underline attribute are underlined, even if they are
20332051 white space.</p>
20342052
20352053 <p><b id="SCI_STYLESETFORE">SCI_STYLESETFORE(int styleNumber, int <a class="jump"
20362054 href="#colour">colour</a>)</b><br />
2037- <b id="SCI_STYLESETBACK">SCI_STYLESETBACK(int styleNumber, int <a class="jump"
2055+ <b id="SCI_STYLEGETFORE">SCI_STYLEGETFORE(int styleNumber)</b><br />
2056+ <b id="SCI_STYLESETBACK">SCI_STYLESETBACK(int styleNumber, int <a class="jump"
20382057 href="#colour">colour</a>)</b><br />
2039- Text is drawn in the foreground colour. The space in each character cell that is not occupied
2058+ <b id="SCI_STYLEGETBACK">SCI_STYLEGETBACK(int styleNumber)</b><br />
2059+ Text is drawn in the foreground colour. The space in each character cell that is not occupied
20402060 by the character is drawn in the background colour.</p>
20412061
20422062 <p><b id="SCI_STYLESETEOLFILLED">SCI_STYLESETEOLFILLED(int styleNumber, bool
20432063 eolFilled)</b><br />
2044- If the last character in the line has a style with this attribute set, the remainder of the
2064+ <b id="SCI_STYLEGETEOLFILLED">SCI_STYLEGETEOLFILLED(int styleNumber)</b><br />
2065+ If the last character in the line has a style with this attribute set, the remainder of the
20452066 line up to the right edge of the window is filled with the background colour set for the last
20462067 character. This is useful when a document contains embedded sections in another language such
20472068 as HTML pages with embedded JavaScript. By setting <code>eolFilled</code> to <code>true</code>
@@ -2051,7 +2072,8 @@
20512072
20522073 <p><b id="SCI_STYLESETCHARACTERSET">SCI_STYLESETCHARACTERSET(int styleNumber, int
20532074 charSet)</b><br />
2054- You can set a style to use a different character set than the default. The places where such
2075+ <b id="SCI_STYLEGETCHARACTERSET">SCI_STYLEGETCHARACTERSET(int styleNumber)</b><br />
2076+ You can set a style to use a different character set than the default. The places where such
20552077 characters sets are likely to be useful are comments and literal strings. For example,
20562078 <code>SCI_STYLESETCHARACTERSET(SCE_C_STRING, SC_CHARSET_RUSSIAN)</code> would ensure that
20572079 strings in Russian would display correctly in C and C++ (<code>SCE_C_STRING</code> is the style
@@ -2076,19 +2098,22 @@
20762098 <code>SC_CHARSET_8859_15</code>.</p>
20772099
20782100 <p><b id="SCI_STYLESETCASE">SCI_STYLESETCASE(int styleNumber, int caseMode)</b><br />
2079- The value of caseMode determines how text is displayed. You can set upper case
2101+ <b id="SCI_STYLEGETCASE">SCI_STYLEGETCASE(int styleNumber)</b><br />
2102+ The value of caseMode determines how text is displayed. You can set upper case
20802103 (<code>SC_CASE_UPPER</code>, 1) or lower case (<code>SC_CASE_LOWER</code>, 2) or display
20812104 normally (<code>SC_CASE_MIXED</code>, 0). This does not change the stored text, only how it is
20822105 displayed.</p>
20832106
20842107 <p><b id="SCI_STYLESETVISIBLE">SCI_STYLESETVISIBLE(int styleNumber, bool visible)</b><br />
2085- Text is normally visible. However, you can completely hide it by giving it a style with the
2108+ <b id="SCI_STYLEGETVISIBLE">SCI_STYLEGETVISIBLE(int styleNumber)</b><br />
2109+ Text is normally visible. However, you can completely hide it by giving it a style with the
20862110 <code>visible</code> set to 0. This could be used to hide embedded formatting instructions or
20872111 hypertext keywords in HTML or XML.</p>
20882112
20892113 <p><b id="SCI_STYLESETCHANGEABLE">SCI_STYLESETCHANGEABLE(int styleNumber, bool
20902114 changeable)</b><br />
2091- This is an experimental and incompletely implemented style attribute. The default setting is
2115+ <b id="SCI_STYLEGETCHANGEABLE">SCI_STYLEGETCHANGEABLE(int styleNumber)</b><br />
2116+ This is an experimental and incompletely implemented style attribute. The default setting is
20922117 <code>changeable</code> set <code>true</code> but when set <code>false</code> it makes text
20932118 read-only. Currently it only stops the caret from being within not-changeable text and does not
20942119 yet stop deleting a range that contains not-changeable text.</p>
@@ -2095,14 +2120,12 @@
20952120
20962121 <p><b id="SCI_STYLESETHOTSPOT">SCI_STYLESETHOTSPOT(int styleNumber, bool
20972122 hotspot)</b><br />
2098- This style is used to mark ranges of text that can detect mouse clicks.
2099- The cursor changes to a hand over hotspots, and the foreground, and background colours
2100- may change and an underline appear to indicate that these areas are sensitive to clicking.
2101- This may be used to allow hyperlinks to other documents.</p>
2123+ <b id="SCI_STYLEGETHOTSPOT">SCI_STYLEGETHOTSPOT(int styleNumber)</b><br />
2124+ This style is used to mark ranges of text that can detect mouse clicks.
2125+ The cursor changes to a hand over hotspots, and the foreground, and background colours
2126+ may change and an underline appear to indicate that these areas are sensitive to clicking.
2127+ This may be used to allow hyperlinks to other documents.</p>
21022128
2103- <a class="message" href="#SCI_STYLESETHOTSPOT">SCI_STYLESETHOTSPOT(int styleNumber, bool
2104- hotspot)</a><br />
2105-
21062129 <h2 id="CaretAndSelectionStyles">Caret, selection, and hotspot styles</h2>
21072130
21082131 <p>The selection is shown by changing the foreground and/or background colours. If one of these
@@ -2111,35 +2134,41 @@
21112134 it was not selected. When there is no selection, the current insertion point is marked by the
21122135 text caret. This is a vertical line that is normally blinking on and off to attract the users
21132136 attention.</p>
2114- <code><a class="message" href="#SCI_SETSELFORE">SCI_SETSELFORE(bool useSelectionForeColour, int
2115- colour)</a><br />
2116- <a class="message" href="#SCI_SETSELBACK">SCI_SETSELBACK(bool useSelectionBackColour, int
2117- colour)</a><br />
2118- <a class="message" href="#SCI_SETSELALPHA">SCI_SETSELALPHA(int alpha)</a><br />
2119- <a class="message" href="#SCI_GETSELALPHA">SCI_GETSELALPHA</a><br />
2120- <a class="message" href="#SCI_SETSELEOLFILLED">SCI_SETSELEOLFILLED(bool filled)</a><br />
2121- <a class="message" href="#SCI_GETSELEOLFILLED">SCI_GETSELEOLFILLED</a><br />
2122- <a class="message" href="#SCI_SETCARETFORE">SCI_SETCARETFORE(int colour)</a><br />
2123- <a class="message" href="#SCI_GETCARETFORE">SCI_GETCARETFORE</a><br />
2124- <a class="message" href="#SCI_SETCARETLINEVISIBLE">SCI_SETCARETLINEVISIBLE(bool
2137+ <code><a class="message" href="#SCI_SETSELFORE">SCI_SETSELFORE(bool useSelectionForeColour,
2138+ int <a class="jump" href="#colour">colour<a>)</a><br />
2139+ <a class="message" href="#SCI_SETSELBACK">SCI_SETSELBACK(bool useSelectionBackColour,
2140+ int <a class="jump" href="#colour">colour<a>)</a><br />
2141+ <a class="message" href="#SCI_SETSELALPHA">SCI_SETSELALPHA(int alpha)</a><br />
2142+ <a class="message" href="#SCI_GETSELALPHA">SCI_GETSELALPHA</a><br />
2143+ <a class="message" href="#SCI_SETSELEOLFILLED">SCI_SETSELEOLFILLED(bool filled)</a><br />
2144+ <a class="message" href="#SCI_GETSELEOLFILLED">SCI_GETSELEOLFILLED</a><br />
2145+ <a class="message" href="#SCI_SETCARETFORE">SCI_SETCARETFORE(int colour)</a><br />
2146+ <a class="message" href="#SCI_GETCARETFORE">SCI_GETCARETFORE</a><br />
2147+ <a class="message" href="#SCI_SETCARETLINEVISIBLE">SCI_SETCARETLINEVISIBLE(bool
21252148 show)</a><br />
2126- <a class="message" href="#SCI_GETCARETLINEVISIBLE">SCI_GETCARETLINEVISIBLE</a><br />
2127- <a class="message" href="#SCI_SETCARETLINEBACK">SCI_SETCARETLINEBACK(int colour)</a><br />
2128- <a class="message" href="#SCI_GETCARETLINEBACK">SCI_GETCARETLINEBACK</a><br />
2129- <a class="message" href="#SCI_SETCARETLINEBACKALPHA">SCI_SETCARETLINEBACKALPHA(int alpha)</a><br />
2130- <a class="message" href="#SCI_GETCARETLINEBACKALPHA">SCI_GETCARETLINEBACKALPHA</a><br />
2131- <a class="message" href="#SCI_SETCARETPERIOD">SCI_SETCARETPERIOD(int milliseconds)</a><br />
2132- <a class="message" href="#SCI_GETCARETPERIOD">SCI_GETCARETPERIOD</a><br />
2133- <a class="message" href="#SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixels)</a><br />
2134- <a class="message" href="#SCI_GETCARETWIDTH">SCI_GETCARETWIDTH</a><br />
2135- <a class="message" href="#SCI_SETHOTSPOTACTIVEFORE">SCI_SETHOTSPOTACTIVEFORE</a><br />
2136- <a class="message" href="#SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK</a><br />
2137- <a class="message" href="#SCI_SETHOTSPOTACTIVEUNDERLINE">SCI_SETHOTSPOTACTIVEUNDERLINE</a><br />
2138- <a class="message" href="#SCI_SETHOTSPOTSINGLELINE">SCI_SETHOTSPOTSINGLELINE</a><br />
2139- <a class="message" href="#SCI_SETCONTROLCHARSYMBOL">SCI_SETCONTROLCHARSYMBOL(int
2149+ <a class="message" href="#SCI_GETCARETLINEVISIBLE">SCI_GETCARETLINEVISIBLE</a><br />
2150+ <a class="message" href="#SCI_SETCARETLINEBACK">SCI_SETCARETLINEBACK(int colour)</a><br />
2151+ <a class="message" href="#SCI_GETCARETLINEBACK">SCI_GETCARETLINEBACK</a><br />
2152+ <a class="message" href="#SCI_SETCARETLINEBACKALPHA">SCI_SETCARETLINEBACKALPHA(int alpha)</a><br />
2153+ <a class="message" href="#SCI_GETCARETLINEBACKALPHA">SCI_GETCARETLINEBACKALPHA</a><br />
2154+ <a class="message" href="#SCI_SETCARETPERIOD">SCI_SETCARETPERIOD(int milliseconds)</a><br />
2155+ <a class="message" href="#SCI_GETCARETPERIOD">SCI_GETCARETPERIOD</a><br />
2156+ <a class="message" href="#SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixels)</a><br />
2157+ <a class="message" href="#SCI_GETCARETWIDTH">SCI_GETCARETWIDTH</a><br />
2158+ <a class="message" href="#SCI_SETHOTSPOTACTIVEFORE">SCI_SETHOTSPOTACTIVEFORE(bool useSetting,
2159+ int <a class="jump" href="#colour">colour<a>)</a><br />
2160+ <a class="message" href="#SCI_GETHOTSPOTACTIVEFORE">SCI_GETHOTSPOTACTIVEFORE</a><br />
2161+ <a class="message" href="#SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK(bool useSetting,
2162+ int <a class="jump" href="#colour">colour<a>)</a><br />
2163+ <a class="message" href="#SCI_GETHOTSPOTACTIVEBACK">SCI_GETHOTSPOTACTIVEBACK</a><br />
2164+ <a class="message" href="#SCI_SETHOTSPOTACTIVEUNDERLINE">SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline)</a><br />
2165+ <a class="message" href="#SCI_GETHOTSPOTACTIVEUNDERLINE">SCI_GETHOTSPOTACTIVEUNDERLINE</a><br />
2166+ <a class="message" href="#SCI_SETHOTSPOTSINGLELINE">SCI_SETHOTSPOTSINGLELINE(bool singleLine)</a><br />
2167+ <a class="message" href="#SCI_GETHOTSPOTSINGLELINE">SCI_GETHOTSPOTSINGLELINE</a><br />
2168+ <a class="message" href="#SCI_SETCONTROLCHARSYMBOL">SCI_SETCONTROLCHARSYMBOL(int
21402169 symbol)</a><br />
21412170 <a class="message" href="#SCI_GETCONTROLCHARSYMBOL">SCI_GETCONTROLCHARSYMBOL</a><br />
2142- <a class="message" href="#SCI_SETCARETSTICKY">SCI_SETCARETSTICKY</a><br />
2171+ <a class="message" href="#SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(bool useCaretStickyBehaviour)</a><br />
21432172 <a class="message" href="#SCI_GETCARETSTICKY">SCI_GETCARETSTICKY</a><br />
21442173 <a class="message" href="#SCI_TOGGLECARETSTICKY">SCI_TOGGLECARETSTICKY</a><br />
21452174 </code>
@@ -2150,7 +2179,7 @@
21502179 href="#colour">colour</a>)</b><br />
21512180 You can choose to override the default selection colouring with these two messages. The colour
21522181 you provide is used if you set <code>useSelection*Colour</code> to <code>true</code>. If it is
2153- set to <code>false</code>, the default colour colouring is used and the <code>colour</code>
2182+ set to <code>false</code>, the default styled colouring is used and the <code>colour</code>
21542183 argument has no effect.</p>
21552184 <p><b id="SCI_SETSELALPHA">SCI_SETSELALPHA(int <a class="jump" href="#alpha">alpha</a>)</b><br />
21562185 <b id="SCI_GETSELALPHA">SCI_GETSELALPHA</b><br />
@@ -2203,13 +2232,17 @@
22032232
22042233 <p><b id="SCI_SETHOTSPOTACTIVEFORE">SCI_SETHOTSPOTACTIVEFORE(bool useHotSpotForeColour, int <a class="jump"
22052234 href="#colour">colour</a>)</b><br />
2206- <b id="SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK(bool useHotSpotBackColour, int <a class="jump"
2235+ <b id="SCI_GETHOTSPOTACTIVEFORE">SCI_GETHOTSPOTACTIVEFORE</b><br />
2236+ <b id="SCI_SETHOTSPOTACTIVEBACK">SCI_SETHOTSPOTACTIVEBACK(bool useHotSpotBackColour, int <a class="jump"
22072237 href="#colour">colour</a>)</b><br />
2208- <b id="SCI_SETHOTSPOTACTIVEUNDERLINE">SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline,)</b><br />
2209- <b id="SCI_SETHOTSPOTSINGLELINE">SCI_SETHOTSPOTSINGLELINE(bool singleLine,)</b><br />
2210- While the cursor hovers over text in a style with the hotspot attribute set,
2211- the default colouring can be modified and an underline drawn with these settings.
2212- Single line mode stops a hotspot from wrapping onto next line.</p>
2238+ <b id="SCI_GETHOTSPOTACTIVEBACK">SCI_GETHOTSPOTACTIVEBACK</b><br />
2239+ <b id="SCI_SETHOTSPOTACTIVEUNDERLINE">SCI_SETHOTSPOTACTIVEUNDERLINE(bool underline)</b><br />
2240+ <b id="SCI_GETHOTSPOTACTIVEUNDERLINE">SCI_GETHOTSPOTACTIVEUNDERLINE</b><br />
2241+ <b id="SCI_SETHOTSPOTSINGLELINE">SCI_SETHOTSPOTSINGLELINE(bool singleLine)</b><br />
2242+ <b id="SCI_GETHOTSPOTSINGLELINE">SCI_GETHOTSPOTSINGLELINE</b><br />
2243+ While the cursor hovers over text in a style with the hotspot attribute set,
2244+ the default colouring can be modified and an underline drawn with these settings.
2245+ Single line mode stops a hotspot from wrapping onto next line.</p>
22132246
22142247 <p><b id="SCI_SETCONTROLCHARSYMBOL">SCI_SETCONTROLCHARSYMBOL(int symbol)</b><br />
22152248 <b id="SCI_GETCONTROLCHARSYMBOL">SCI_GETCONTROLCHARSYMBOL</b><br />
@@ -2227,11 +2260,11 @@
22272260 The default symbol value is 0.</p>
22282261
22292262 <p><b id="SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(bool useCaretStickyBehaviour)</b><br />
2230- <b id="SCI_GETCARETSTICKY">SCI_GETCARETSTICKY</b><br />
2231- <b id="SCI_TOGGLECARETSTICKY">SCI_TOGGLECARETSTICKY</b><br />
2232- These messages set, get or toggle the caretSticky flag which controls when the last position
2233- of the caret on the line is saved. When set to true, the position is not saved when you type
2234- a character, a tab, paste the clipboard content or press backspace.</p>
2263+ <b id="SCI_GETCARETSTICKY">SCI_GETCARETSTICKY</b><br />
2264+ <b id="SCI_TOGGLECARETSTICKY">SCI_TOGGLECARETSTICKY</b><br />
2265+ These messages set, get or toggle the caretSticky flag which controls when the last position
2266+ of the caret on the line is saved. When set to true, the position is not saved when you type
2267+ a character, a tab, paste the clipboard content or press backspace.</p>
22352268
22362269 <h2 id="Margins">Margins</h2>
22372270
@@ -4558,7 +4591,7 @@
45584591 // SCN_DWELLEND, SCN_CALLTIPCLICK,
45594592 // SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK
45604593 int ch; // SCN_CHARADDED, SCN_KEY
4561- int modifiers; // SCN_KEY, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK
4594+ int modifiers; // SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK
45624595 int modificationType; // SCN_MODIFIED
45634596 const char *text; // SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION
45644597 int length; // SCN_MODIFIED
--- trunk/src/Utils/scintilla/doc/ScintillaDownload.html (revision 9095)
+++ trunk/src/Utils/scintilla/doc/ScintillaDownload.html (revision 9096)
@@ -25,9 +25,9 @@
2525 <table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
2626 <tr>
2727 <td>
28- <font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla172.zip?download">
28+ <font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla173.zip?download">
2929 Windows</a>&nbsp;&nbsp;
30- <a href="http://prdownloads.sourceforge.net/scintilla/scintilla172.tgz?download">
30+ <a href="http://prdownloads.sourceforge.net/scintilla/scintilla173.tgz?download">
3131 GTK+/Linux</a>&nbsp;&nbsp;
3232 </font>
3333 </td>
@@ -41,7 +41,7 @@
4141 containing very few restrictions.
4242 </p>
4343 <h3>
44- Release 1.72
44+ Release 1.73
4545 </h3>
4646 <h4>
4747 Source Code
@@ -49,8 +49,8 @@
4949 The source code package contains all of the source code for Scintilla but no binary
5050 executable code and is available in
5151 <ul>
52- <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla172.zip?download">zip format</a> (740K) commonly used on Windows</li>
53- <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla172.tgz?download">tgz format</a> (640K) commonly used on Linux and compatible operating systems</li>
52+ <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla173.zip?download">zip format</a> (740K) commonly used on Windows</li>
53+ <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla173.tgz?download">tgz format</a> (640K) commonly used on Linux and compatible operating systems</li>
5454 </ul>
5555 Instructions for building on both Windows and Linux are included in the readme file.
5656 <h4>
--- trunk/src/Utils/scintilla/doc/ScintillaHistory.html (revision 9095)
+++ trunk/src/Utils/scintilla/doc/ScintillaHistory.html (revision 9096)
@@ -226,6 +226,11 @@
226226 <li>Pieter Holtzhausen</li>
227227 <li>Waldemar Augustyn</li>
228228 <li>Jason Haslam</li>
229+ <li>Sebastian Steinlechner</li>
230+ <li>Chris Rickard</li>
231+ <li>Rob McMullen</li>
232+ <li>Stefan Schwendeler</li>
233+ <li>Cristian Adam</li>
229234 </ul>
230235 <p>
231236 Images used in GTK+ version
@@ -237,6 +242,124 @@
237242 </li>
238243 </ul>
239244 <h3>
245+ <a href="http://prdownloads.sourceforge.net/scintilla/scite173.zip?download">Release 1.73</a>
246+ </h3>
247+ <ul>
248+ <li>
249+ Released on 31 March 2007.
250+ </li>
251+ <li>
252+ SciTE adds a Directory properties file to configure behaviour for files in a directory and its subdirectories.
253+ </li>
254+ <li>
255+ Style changes may be made during text modification events.
256+ </li>
257+ <li>
258+ Regular expressions recognize \d, \D, \s, \S, \w, \W, and \xHH.
259+ </li>
260+ <li>
261+ Support for cmake language added.
262+ </li>
263+ <li>
264+ More Scintilla properties can be queried.
265+ </li>
266+ <li>
267+ Edge line drawn under text.
268+ </li>
269+ <li>
270+ A savesession command added to SciTE director interface.
271+ </li>
272+ <li>
273+ SciTE File | Encoding menu item names changed to be less confusing.
274+ </li>
275+ <li>
276+ SciTE on GTK+ dialog buttons reordered to follow guidelines.
277+ </li>
278+ <li>
279+ SciTE on GTK+ removed GTK+ 1.x compatible file dialog code.
280+ </li>
281+ <li>
282+ SciTE on GTK+ recognizes key names KeypadMultiply and KeypadDivide.
283+ </li>
284+ <li>
285+ Background colour of line wrapping visual flag changed to STYLE_DEFAULT.
286+ </li>
287+ <li>
288+ Makefile lexing enhanced for ':=' operator and when lines start with tab.
289+ </li>
290+ <li>
291+ TADS3 lexer and folder improved.
292+ </li>
293+ <li>
294+ SCN_DOUBLECLICK notification may set SCI_SHIFT, SCI_CTRL, and SCI_ALT flags on modifiers field.
295+ </li>
296+ <li>
297+ Slow folding of large constructs in Python fixed.
298+ </li>
299+ <li>
300+ MSSQL folding fixed to be case-insensitive and fold at more keywords.
301+ </li>
302+ <li>
303+ SciTE's brace matching works better for HTML.
304+ </li>
305+ <li>
306+ Determining API list items checks for specified parameters start character before default '('.
307+ </li>
308+ <li>
309+ Hang fixed in HTML lexer.
310+ </li>
311+ <li>
312+ Bug fixed in with LineTranspose command where markers could move to different line.
313+ </li>
314+ <li>
315+ Memory released when buffer completely emptied.
316+ </li>
317+ <li>
318+ If translucency not available on Windows, draw rectangular outline instead.
319+ </li>
320+ <li>
321+ Bash lexer handles "-x" in "--x-includes..." better.
322+ </li>
323+ <li>
324+ AutoIt3 lexer fixes string followed by '+'.
325+ </li>
326+ <li>
327+ LinesJoin fixed where it stopped early due to not adjusting for inserted spaces..
328+ </li>
329+ <li>
330+ StutteredPageDown fixed when lines wrapped.
331+ </li>
332+ <li>
333+ FormatRange fixed to not double count line number width which could lead to a large space.
334+ </li>
335+ <li>
336+ SciTE Export As PDF and Latex commands fixed to format floating point numbers with '.' even in locales
337+ that use ','.
338+ </li>
339+ <li>
340+ SciTE bug fixed where File | New could produce buffer with contents of previous file when using read-only mode.
341+ </li>
342+ <li>
343+ SciTE retains current scroll position when switching buffers and fold.on.open set.
344+ </li>
345+ <li>
346+ SciTE crash fixed where '*' used to invoke parameters dialog.
347+ </li>
348+ <li>
349+ SciTE bugs when writing large UCS-2 files fixed.
350+ </li>
351+ <li>
352+ Bug fixed when scrolling inside a SCN_PAINTED event by invalidating window
353+ rather than trying to perform synchronous painting.
354+ </li>
355+ <li>
356+ SciTE for GTK+ View | Full Screen works on recent versions of GTK+.
357+ </li>
358+ <li>
359+ SciTE for Windows enables and disables toolbar commands correctly.
360+ </li>
361+ </ul>
362+ <h3>
240363 <a href="http://prdownloads.sourceforge.net/scintilla/scite172.zip?download">Release 1.72</a>
241364 </h3>
242365 <ul>
@@ -247,7 +370,7 @@
247370 Performance of per-line data improved.
248371 </li>
249372 <li>
250- SC_STARTACTION flag set on the first modification notification in an undo
373+ SC_STARTACTION flag set on the first modification notification in an undo
251374 transaction to help synchronize the container's undo stack with Scintilla's.
252375 </li>
253376 <li>
--- trunk/src/Utils/scintilla/doc/ScintillaRelated.html (revision 9095)
+++ trunk/src/Utils/scintilla/doc/ScintillaRelated.html (revision 9096)
@@ -241,11 +241,6 @@
241241 is part of some commercial high-school oriented programming course software.
242242 </p>
243243 <p>
244- <a href="http://www.phpwebclasses.org/index.php?node=13">phpSciTE</a>
245- is a free distribution of SciTE for Windows customised for use with PHP
246- and bundled with a PHP API file and online help.
247- </p>
248- <p>
249244 <a href="http://www.blazingtools.com/is.html">Instant Source</a>
250245 is a commercial tool for looking at the HTML on web sites.
251246 </p>
@@ -254,11 +249,6 @@
254249 is a free C++ Rapid Application Developer for Win32.
255250 </p>
256251 <p>
257- <a href="http://www.luascript.thersgb.net/index.htm">wxLua</a> is both
258- a binding of the wxWindows classes for Lua and a small IDE that works on Linux
259- and Windows.
260- </p>
261- <p>
262252 <a href="http://wxbasic.sourceforge.net/">wxBasic</a> is an open source
263253 Basic interpreter that uses the wxWindows toolkit. A small IDE is under construction.
264254 </p>
@@ -351,18 +341,6 @@
351341 is an open source C/C++ IDE for Linux/GNOME.
352342 </p>
353343 <p>
354- <a href="http://www.develop.com/genx/">Gen&lt;X&gt;</a>
355- is a <i>code generalisation</i> product for Win32 that uses Scintilla in the X-Code Editor (which
356- can also be used for general purpose editing) and for editing HTML in the HTML Dialog
357- Editor.
358- </p>
359- <p>
360- <a href="http://www.micampe.it/software/moleskine/">Moleskine</a> is a Scintilla
361- based editor for GTK+. More ambitious than SciTE with plans
362- for MDI, printing, and session management.
363- Includes a new GTK+ wrapper widget for Scintilla.
364- </p>
365- <p>
366344 A <a href="http://www.burgaud.com">version of SciTE for Win32</a> enhanced
367345 with a tab control to allow easy movement between buffers.
368346 Go to the "Goodies" area on this site.
@@ -378,16 +356,11 @@
378356 Currently at an early stage of development.
379357 </p>
380358 <p>
381- <a href="http://agast.dyndns.org/agast/home.html">
359+ <a href="http://www.allitis.com/agast/home.html">
382360 Agast</a> is an authoring system for adventure games which includes
383361 a customised version of SciTE.
384362 </p>
385363 <p>
386- <a href="http://oss.software.ibm.com/developerworks/opensource/sashxb/">
387- SashXB for Linux</a> is an open source application development tool by
388- IBM that uses Scintilla.
389- </p>
390- <p>
391364 <a href="http://boa-constructor.sourceforge.net/">Boa Constructor</a> is a RAD GUI
392365 Building IDE for the wxWindows cross platform platform. Written using wxPython with the
393366 wxStyledTextCtrl used as its editor.
--- trunk/src/Utils/scintilla/doc/index.html (revision 9095)
+++ trunk/src/Utils/scintilla/doc/index.html (revision 9096)
@@ -9,7 +9,7 @@
99 <meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
1010 <meta name="Description"
1111 content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
12- <meta name="Date.Modified" content="20070115" />
12+ <meta name="Date.Modified" content="20070331" />
1313 <style type="text/css">
1414 .versionlist {
1515 color: #FFCC99;
@@ -36,8 +36,8 @@
3636 GTK+</font>
3737 </td>
3838 <td width="40%" align="right">
39- <font color="#FFCC99" size="3"> Release version 1.72<br />
40- Site last modified January 15 2007</font>
39+ <font color="#FFCC99" size="3"> Release version 1.73<br />
40+ Site last modified March 31 2007</font>
4141 </td>
4242 <td width="20%">
4343 &nbsp;
@@ -54,6 +54,11 @@
5454 <table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="6" border="0">
5555 <tr>
5656 <td width="100%">
57+ <span class="versionlist">Version 1.73 allows style changes to be made during text modification events.</span>
58+ </td>
59+ </tr>
60+ <tr>
61+ <td width="100%">
5762 <span class="versionlist">Version 1.72 is more efficient at handling per-line information.</span>
5863 </td>
5964 </tr>
--- trunk/src/Utils/scintilla/include/SciLexer.h (revision 9095)
+++ trunk/src/Utils/scintilla/include/SciLexer.h (revision 9096)
@@ -92,6 +92,7 @@
9292 #define SCLEX_OPAL 77
9393 #define SCLEX_SPICE 78
9494 #define SCLEX_D 79
95+#define SCLEX_CMAKE 80
9596 #define SCLEX_AUTOMATIC 1000
9697 #define SCE_P_DEFAULT 0
9798 #define SCE_P_COMMENTLINE 1
@@ -946,6 +947,7 @@
946947 #define SCE_T3_USER1 17
947948 #define SCE_T3_USER2 18
948949 #define SCE_T3_USER3 19
950+#define SCE_T3_BRACE 20
949951 #define SCE_REBOL_DEFAULT 0
950952 #define SCE_REBOL_COMMENTLINE 1
951953 #define SCE_REBOL_COMMENTBLOCK 2
@@ -1086,6 +1088,21 @@
10861088 #define SCE_SPICE_DELIMITER 6
10871089 #define SCE_SPICE_VALUE 7
10881090 #define SCE_SPICE_COMMENTLINE 8
1091+#define SCE_CMAKE_DEFAULT 0
1092+#define SCE_CMAKE_COMMENT 1
1093+#define SCE_CMAKE_STRINGDQ 2
1094+#define SCE_CMAKE_STRINGLQ 3
1095+#define SCE_CMAKE_STRINGRQ 4
1096+#define SCE_CMAKE_COMMANDS 5
1097+#define SCE_CMAKE_PARAMETERS 6
1098+#define SCE_CMAKE_VARIABLE 7
1099+#define SCE_CMAKE_USERDEFINED 8
1100+#define SCE_CMAKE_WHILEDEF 9
1101+#define SCE_CMAKE_FOREACHDEF 10
1102+#define SCE_CMAKE_IFDEFINEDEF 11
1103+#define SCE_CMAKE_MACRODEF 12
1104+#define SCE_CMAKE_STRINGVAR 13
1105+#define SCE_CMAKE_NUMBER 14
10891106 #define SCLEX_ASP 29
10901107 #define SCLEX_PHP 30
10911108 //--Autogenerated -- end of section automatically generated from Scintilla.iface
--- trunk/src/Utils/scintilla/include/Scintilla.h (revision 9095)
+++ trunk/src/Utils/scintilla/include/Scintilla.h (revision 9096)
@@ -194,6 +194,19 @@
194194 #define SC_CASE_MIXED 0
195195 #define SC_CASE_UPPER 1
196196 #define SC_CASE_LOWER 2
197+#define SCI_STYLEGETFORE 2481
198+#define SCI_STYLEGETBACK 2482
199+#define SCI_STYLEGETBOLD 2483
200+#define SCI_STYLEGETITALIC 2484
201+#define SCI_STYLEGETSIZE 2485
202+#define SCI_STYLEGETFONT 2486
203+#define SCI_STYLEGETEOLFILLED 2487
204+#define SCI_STYLEGETUNDERLINE 2488
205+#define SCI_STYLEGETCASE 2489
206+#define SCI_STYLEGETCHARACTERSET 2490
207+#define SCI_STYLEGETVISIBLE 2491
208+#define SCI_STYLEGETCHANGEABLE 2492
209+#define SCI_STYLEGETHOTSPOT 2493
197210 #define SCI_STYLESETCASE 2060
198211 #define SCI_STYLESETCHARACTERSET 2066
199212 #define SCI_STYLESETHOTSPOT 2409
@@ -568,9 +581,13 @@
568581 #define SCI_SETPRINTWRAPMODE 2406
569582 #define SCI_GETPRINTWRAPMODE 2407
570583 #define SCI_SETHOTSPOTACTIVEFORE 2410
584+#define SCI_GETHOTSPOTACTIVEFORE 2494
571585 #define SCI_SETHOTSPOTACTIVEBACK 2411
586+#define SCI_GETHOTSPOTACTIVEBACK 2495
572587 #define SCI_SETHOTSPOTACTIVEUNDERLINE 2412
588+#define SCI_GETHOTSPOTACTIVEUNDERLINE 2496
573589 #define SCI_SETHOTSPOTSINGLELINE 2421
590+#define SCI_GETHOTSPOTSINGLELINE 2497
574591 #define SCI_PARADOWN 2413
575592 #define SCI_PARADOWNEXTEND 2414
576593 #define SCI_PARAUP 2415
--- trunk/src/Utils/scintilla/src/Document.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/Document.cxx (revision 9096)
@@ -55,7 +55,8 @@
5555 stylingMask = 0;
5656 endStyled = 0;
5757 styleClock = 0;
58- enteredCount = 0;
58+ enteredModification = 0;
59+ enteredStyling = 0;
5960 enteredReadOnlyCount = 0;
6061 tabInChars = 8;
6162 indentInChars = 0;
@@ -369,10 +370,10 @@
369370 if ((pos + len) > Length())
370371 return false;
371372 CheckReadOnly();
372- if (enteredCount != 0) {
373+ if (enteredModification != 0) {
373374 return false;
374375 } else {
375- enteredCount++;
376+ enteredModification++;
376377 if (!cb.IsReadOnly()) {
377378 NotifyModified(
378379 DocModification(
@@ -395,7 +396,7 @@
395396 pos, len,
396397 LinesTotal() - prevLinesTotal, text));
397398 }
398- enteredCount--;
399+ enteredModification--;
399400 }
400401 return !cb.IsReadOnly();
401402 }
@@ -408,10 +409,10 @@
408409 return false;
409410 }
410411 CheckReadOnly();
411- if (enteredCount != 0) {
412+ if (enteredModification != 0) {
412413 return false;
413414 } else {
414- enteredCount++;
415+ enteredModification++;
415416 if (!cb.IsReadOnly()) {
416417 NotifyModified(
417418 DocModification(
@@ -431,7 +432,7 @@
431432 position, insertLength,
432433 LinesTotal() - prevLinesTotal, text));
433434 }
434- enteredCount--;
435+ enteredModification--;
435436 }
436437 return !cb.IsReadOnly();
437438 }
@@ -439,8 +440,8 @@
439440 int Document::Undo() {
440441 int newPos = -1;
441442 CheckReadOnly();
442- if (enteredCount == 0) {
443- enteredCount++;
443+ if (enteredModification == 0) {
444+ enteredModification++;
444445 if (!cb.IsReadOnly()) {
445446 bool startSavePoint = cb.IsSavePoint();
446447 bool multiLine = false;
@@ -487,7 +488,7 @@
487488 if (startSavePoint != endSavePoint)
488489 NotifySavePoint(endSavePoint);
489490 }
490- enteredCount--;
491+ enteredModification--;
491492 }
492493 return newPos;
493494 }
@@ -495,8 +496,8 @@
495496 int Document::Redo() {
496497 int newPos = -1;
497498 CheckReadOnly();
498- if (enteredCount == 0) {
499- enteredCount++;
499+ if (enteredModification == 0) {
500+ enteredModification++;
500501 if (!cb.IsReadOnly()) {
501502 bool startSavePoint = cb.IsSavePoint();
502503 bool multiLine = false;
@@ -541,7 +542,7 @@
541542 if (startSavePoint != endSavePoint)
542543 NotifySavePoint(endSavePoint);
543544 }
544- enteredCount--;
545+ enteredModification--;
545546 }
546547 return newPos;
547548 }
@@ -671,7 +672,7 @@
671672 return column;
672673 } else {
673674 column++;
674- i = MovePositionOutsideChar(i + 1, 1);
675+ i = MovePositionOutsideChar(i + 1, 1, false);
675676 }
676677 }
677678 }
@@ -693,7 +694,7 @@
693694 return position;
694695 } else {
695696 columnCurrent++;
696- position = MovePositionOutsideChar(position + 1, 1);
697+ position = MovePositionOutsideChar(position + 1, 1, false);
697698 }
698699 }
699700 }
@@ -1275,10 +1276,10 @@
12751276 }
12761277
12771278 bool Document::SetStyleFor(int length, char style) {
1278- if (enteredCount != 0) {
1279+ if (enteredStyling != 0) {
12791280 return false;
12801281 } else {
1281- enteredCount++;
1282+ enteredStyling++;
12821283 style &= stylingMask;
12831284 int prevEndStyled = endStyled;
12841285 if (cb.SetStyleFor(endStyled, length, style, stylingMask)) {
@@ -1287,16 +1288,16 @@
12871288 NotifyModified(mh);
12881289 }
12891290 endStyled += length;
1290- enteredCount--;
1291+ enteredStyling--;
12911292 return true;
12921293 }
12931294 }
12941295
12951296 bool Document::SetStyles(int length, char *styles) {
1296- if (enteredCount != 0) {
1297+ if (enteredStyling != 0) {
12971298 return false;
12981299 } else {
1299- enteredCount++;
1300+ enteredStyling++;
13001301 bool didChange = false;
13011302 int startMod = 0;
13021303 int endMod = 0;
@@ -1315,13 +1316,13 @@
13151316 startMod, endMod - startMod + 1);
13161317 NotifyModified(mh);
13171318 }
1318- enteredCount--;
1319+ enteredStyling--;
13191320 return true;
13201321 }
13211322 }
13221323
1323-bool Document::EnsureStyledTo(int pos) {
1324- if (pos > GetEndStyled()) {
1324+void Document::EnsureStyledTo(int pos) {
1325+ if ((enteredStyling == 0) && (pos > GetEndStyled())) {
13251326 IncrementStyleClock();
13261327 // Ask the watchers to style, and stop as soon as one responds.
13271328 for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) {
@@ -1328,7 +1329,6 @@
13281329 watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
13291330 }
13301331 }
1331- return pos <= GetEndStyled();
13321332 }
13331333
13341334 void Document::IncrementStyleClock() {
--- trunk/src/Utils/scintilla/src/Document.h (revision 9095)
+++ trunk/src/Utils/scintilla/src/Document.h (revision 9096)
@@ -97,7 +97,8 @@
9797 char stylingMask;
9898 int endStyled;
9999 int styleClock;
100- int enteredCount;
100+ int enteredModification;
101+ int enteredStyling;
101102 int enteredReadOnlyCount;
102103
103104 WatcherWithUserData *watchers;
@@ -212,7 +213,7 @@
212213 bool SetStyleFor(int length, char style);
213214 bool SetStyles(int length, char *styles);
214215 int GetEndStyled() { return endStyled; }
215- bool EnsureStyledTo(int pos);
216+ void EnsureStyledTo(int pos);
216217 int GetStyleClock() { return styleClock; }
217218 void IncrementStyleClock();
218219
--- trunk/src/Utils/scintilla/src/DocumentAccessor.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/DocumentAccessor.cxx (revision 9096)
@@ -105,8 +105,9 @@
105105 void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) {
106106 // Only perform styling if non empty range
107107 if (pos != startSeg - 1) {
108+ PLATFORM_ASSERT(pos >= startSeg);
108109 if (pos < startSeg) {
109- Platform::DebugPrintf("Bad colour positions %d - %d\n", startSeg, pos);
110+ return;
110111 }
111112
112113 if (validLen + (pos - startSeg + 1) >= bufferSize)
--- trunk/src/Utils/scintilla/src/Editor.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/Editor.cxx (revision 9096)
@@ -1125,7 +1125,7 @@
11251125 ShowCaretAtCurrentPosition();
11261126 // Perform redraw rather than scroll if many lines would be redrawn anyway.
11271127 #ifndef UNDER_CE
1128- if (abs(linesToMove) <= 10) {
1128+ if ((abs(linesToMove) <= 10) && (paintState == notPainting)) {
11291129 ScrollText(linesToMove);
11301130 } else {
11311131 Redraw();
@@ -1627,6 +1627,7 @@
16271627 if (prevNonWS) {
16281628 // Ensure at least one space separating previous lines
16291629 pdoc->InsertChar(pos, ' ');
1630+ targetEnd++;
16301631 }
16311632 } else {
16321633 prevNonWS = pdoc->CharAt(pos) != ' ';
@@ -2373,6 +2374,10 @@
23732374 lineEnd = ll->LineStart(subLine + 1);
23742375 }
23752376
2377+ ColourAllocated wrapColour = vsDraw.styles[STYLE_DEFAULT].fore.allocated;
2378+ if (vsDraw.whitespaceForegroundSet)
2379+ wrapColour = vsDraw.whitespaceForeground.allocated;
2380+
23762381 bool drawWrapMarkEnd = false;
23772382
23782383 if (wrapVisualFlags & SC_WRAPVISUALFLAG_END) {
@@ -2396,7 +2401,8 @@
23962401 rcPlace.right = rcPlace.left + actualWrapVisualStartIndent * vsDraw.aveCharWidth;
23972402
23982403 // default bgnd here..
2399- surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back.allocated);
2404+ surface->FillRectangle(rcSegment, overrideBackground ? background :
2405+ vsDraw.styles[STYLE_DEFAULT].back.allocated);
24002406
24012407 // main line style would be below but this would be inconsistent with end markers
24022408 // also would possibly not be the style at wrap point
@@ -2410,7 +2416,7 @@
24102416 else
24112417 rcPlace.right = rcPlace.left + vsDraw.aveCharWidth;
24122418
2413- DrawWrapMarker(surface, rcPlace, false, vsDraw.whitespaceForeground.allocated);
2419+ DrawWrapMarker(surface, rcPlace, false, wrapColour);
24142420 }
24152421
24162422 xStart += actualWrapVisualStartIndent * vsDraw.aveCharWidth;
@@ -2477,9 +2483,16 @@
24772483 if (twoPhaseDraw) {
24782484 DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd,
24792485 xStart, subLine, subLineStart, overrideBackground, background,
2480- drawWrapMarkEnd, vsDraw.whitespaceForeground.allocated);
2486+ drawWrapMarkEnd, wrapColour);
24812487 }
24822488
2489+ if (vsDraw.edgeState == EDGE_LINE) {
2490+ int edgeX = theEdge * vsDraw.spaceWidth;
2491+ rcSegment.left = edgeX + xStart;
2492+ rcSegment.right = rcSegment.left + 1;
2493+ surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated);
2494+ }
2495+
24832496 inIndentation = subLine == 0; // Do not handle indentation except on first subline.
24842497 startseg = ll->LineStart(subLine);
24852498 // Foreground drawing loop
@@ -2676,7 +2689,7 @@
26762689 if (!twoPhaseDraw) {
26772690 DrawEOL(surface, vsDraw, rcLine, ll, line, lineEnd,
26782691 xStart, subLine, subLineStart, overrideBackground, background,
2679- drawWrapMarkEnd, vsDraw.whitespaceForeground.allocated);
2692+ drawWrapMarkEnd, wrapColour);
26802693 }
26812694 if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) && (ll->selStart >= 0) && (ll->selEnd >= 0)) {
26822695 int startPosSel = (ll->selStart < posLineStart) ? posLineStart : ll->selStart;
@@ -2688,13 +2701,6 @@
26882701 }
26892702 }
26902703
2691- if (vsDraw.edgeState == EDGE_LINE) {
2692- int edgeX = theEdge * vsDraw.spaceWidth;
2693- rcSegment.left = edgeX + xStart;
2694- rcSegment.right = rcSegment.left + 1;
2695- surface->FillRectangle(rcSegment, vsDraw.edgecolour.allocated);
2696- }
2697-
26982704 // Draw any translucent whole line states
26992705 rcSegment.left = xStart;
27002706 rcSegment.right = rcLine.right - 1;
@@ -3173,9 +3179,6 @@
31733179 vsPrint.styles[STYLE_LINENUMBER].back.desired = ColourDesired(0xff, 0xff, 0xff);
31743180
31753181 vsPrint.Refresh(*surfaceMeasure);
3176- // Ensure colours are set up
3177- vsPrint.RefreshColourPalette(palette, true);
3178- vsPrint.RefreshColourPalette(palette, false);
31793182 // Determining width must hapen after fonts have been realised in Refresh
31803183 int lineNumberWidth = 0;
31813184 if (lineNumberIndex >= 0) {
@@ -3182,7 +3185,11 @@
31823185 lineNumberWidth = surfaceMeasure->WidthText(vsPrint.styles[STYLE_LINENUMBER].font,
31833186 "99999" lineNumberPrintSpace, 5 + istrlen(lineNumberPrintSpace));
31843187 vsPrint.ms[lineNumberIndex].width = lineNumberWidth;
3188+ vsPrint.Refresh(*surfaceMeasure); // Recalculate fixedColumnWidth
31853189 }
3190+ // Ensure colours are set up
3191+ vsPrint.RefreshColourPalette(palette, true);
3192+ vsPrint.RefreshColourPalette(palette, false);
31863193
31873194 int linePrintStart = pdoc->LineFromPosition(pfr->chrg.cpMin);
31883195 int linePrintLast = linePrintStart + (pfr->rc.bottom - pfr->rc.top) / vsPrint.lineHeight - 1;
@@ -3201,7 +3208,7 @@
32013208 // Ensure we are styled to where we are formatting.
32023209 pdoc->EnsureStyledTo(endPosPrint);
32033210
3204- int xStart = vsPrint.fixedColumnWidth + pfr->rc.left + lineNumberWidth;
3211+ int xStart = vsPrint.fixedColumnWidth + pfr->rc.left;
32053212 int ypos = pfr->rc.top;
32063213
32073214 int lineDoc = linePrintStart;
@@ -3208,7 +3215,7 @@
32083215
32093216 int nPrintPos = pfr->chrg.cpMin;
32103217 int visibleLine = 0;
3211- int widthPrint = pfr->rc.Width() - lineNumberWidth;
3218+ int widthPrint = pfr->rc.Width() - vsPrint.fixedColumnWidth;
32123219 if (printWrapState == eWrapNone)
32133220 widthPrint = LineLayout::wrapWidthInfinite;
32143221
@@ -3230,7 +3237,7 @@
32303237 ll.containsCaret = false;
32313238
32323239 PRectangle rcLine;
3233- rcLine.left = pfr->rc.left + lineNumberWidth;
3240+ rcLine.left = pfr->rc.left;
32343241 rcLine.top = ypos;
32353242 rcLine.right = pfr->rc.right - 1;
32363243 rcLine.bottom = ypos + vsPrint.lineHeight;
@@ -3259,7 +3266,7 @@
32593266 PRectangle rcNumber = rcLine;
32603267 rcNumber.right = rcNumber.left + lineNumberWidth;
32613268 // Right justify
3262- rcNumber.left -= surfaceMeasure->WidthText(
3269+ rcNumber.left = rcNumber.right - surfaceMeasure->WidthText(
32633270 vsPrint.styles[STYLE_LINENUMBER].font, number, istrlen(number));
32643271 surface->FlushCachedState();
32653272 surface->DrawTextNoClip(rcNumber, vsPrint.styles[STYLE_LINENUMBER].font,
@@ -3631,11 +3638,13 @@
36313638 NotifyParent(scn);
36323639 }
36333640
3634-void Editor::NotifyDoubleClick(Point pt, bool) {
3641+void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
36353642 SCNotification scn = {0};
36363643 scn.nmhdr.code = SCN_DOUBLECLICK;
36373644 scn.line = LineFromLocation(pt);
36383645 scn.position = PositionFromLocationClose(pt);
3646+ scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) |
3647+ (alt ? SCI_ALT : 0);
36393648 NotifyParent(scn);
36403649 }
36413650
@@ -4019,7 +4028,10 @@
40194028 // I consider only the caretYSlop, and ignore the caretYPolicy-- is that a problem?
40204029 int currentLine = pdoc->LineFromPosition(currentPos);
40214030 int topStutterLine = topLine + caretYSlop;
4022- int bottomStutterLine = topLine + LinesToScroll() - caretYSlop;
4031+ int bottomStutterLine =
4032+ pdoc->LineFromPosition(PositionFromLocation(
4033+ Point(lastXChosen, direction * vs.lineHeight * LinesToScroll())))
4034+ - caretYSlop - 1;
40234035
40244036 if (stuttered && (direction < 0 && currentLine > topStutterLine)) {
40254037 topLineNew = topLine;
@@ -4072,32 +4084,24 @@
40724084 void Editor::LineTranspose() {
40734085 int line = pdoc->LineFromPosition(currentPos);
40744086 if (line > 0) {
4087+ pdoc->BeginUndoAction();
40754088 int startPrev = pdoc->LineStart(line - 1);
40764089 int endPrev = pdoc->LineEnd(line - 1);
40774090 int start = pdoc->LineStart(line);
40784091 int end = pdoc->LineEnd(line);
4079- int startNext = pdoc->LineStart(line + 1);
4080- if (end < pdoc->Length()) {
4081- end = startNext;
4082- char *thisLine = CopyRange(start, end);
4083- pdoc->DeleteChars(start, end - start);
4084- if (pdoc->InsertString(startPrev, thisLine, end - start)) {
4085- MovePositionTo(startPrev + end - start);
4086- }
4087- delete []thisLine;
4088- } else {
4089- // Last line so line has no line end
4090- char *thisLine = CopyRange(start, end);
4091- char *prevEnd = CopyRange(endPrev, start);
4092- pdoc->DeleteChars(endPrev, end - endPrev);
4093- pdoc->InsertString(startPrev, thisLine, end - start);
4094- if (pdoc->InsertString(startPrev + end - start, prevEnd, start - endPrev)) {
4095- MovePositionTo(startPrev + end - endPrev);
4096- }
4097- delete []thisLine;
4098- delete []prevEnd;
4092+ char *line1 = CopyRange(startPrev, endPrev);
4093+ int len1 = endPrev - startPrev;
4094+ char *line2 = CopyRange(start, end);
4095+ int len2 = end - start;
4096+ if (pdoc->DeleteChars(start, len2)) {
4097+ pdoc->DeleteChars(startPrev, len1);
4098+ pdoc->InsertString(startPrev, line2, len2);
4099+ pdoc->InsertString(start - len1 + len2, line1, len1);
4100+ MovePositionTo(start - len1 + len2);
40994101 }
4100-
4102+ delete []line1;
4103+ delete []line2;
4104+ pdoc->EndUndoAction();
41014105 }
41024106 }
41034107
@@ -5151,7 +5155,7 @@
51515155 }
51525156 //Platform::DebugPrintf("Double click: %d - %d\n", anchor, currentPos);
51535157 if (doubleClick) {
5154- NotifyDoubleClick(pt, shift);
5158+ NotifyDoubleClick(pt, shift, ctrl, alt);
51555159 if (PositionIsHotspot(newPos))
51565160 NotifyHotSpotDoubleClicked(newPos, shift, ctrl, alt);
51575161 }
@@ -6773,7 +6777,73 @@
67736777 InvalidateStyleRedraw();
67746778 }
67756779 break;
6780+ case SCI_STYLEGETFORE:
6781+ if (wParam <= STYLE_MAX)
6782+ return vs.styles[wParam].fore.desired.AsLong();
6783+ else
6784+ return 0;
6785+ case SCI_STYLEGETBACK:
6786+ if (wParam <= STYLE_MAX)
6787+ return vs.styles[wParam].back.desired.AsLong();
6788+ else
6789+ return 0;
6790+ case SCI_STYLEGETBOLD:
6791+ if (wParam <= STYLE_MAX)
6792+ return vs.styles[wParam].bold ? 1 : 0;
6793+ else
6794+ return 0;
6795+ case SCI_STYLEGETITALIC:
6796+ if (wParam <= STYLE_MAX)
6797+ return vs.styles[wParam].italic ? 1 : 0;
6798+ else
6799+ return 0;
6800+ case SCI_STYLEGETEOLFILLED:
6801+ if (wParam <= STYLE_MAX)
6802+ return vs.styles[wParam].eolFilled ? 1 : 0;
6803+ else
6804+ return 0;
6805+ case SCI_STYLEGETSIZE:
6806+ if (wParam <= STYLE_MAX)
6807+ return vs.styles[wParam].size;
6808+ else
6809+ return 0;
6810+ case SCI_STYLEGETFONT:
6811+ if (lParam == 0)
6812+ return strlen(vs.styles[wParam].fontName);
67766813
6814+ if (wParam <= STYLE_MAX)
6815+ strcpy(CharPtrFromSPtr(lParam), vs.styles[wParam].fontName);
6816+ break;
6817+ case SCI_STYLEGETUNDERLINE:
6818+ if (wParam <= STYLE_MAX)
6819+ return vs.styles[wParam].underline ? 1 : 0;
6820+ else
6821+ return 0;
6822+ case SCI_STYLEGETCASE:
6823+ if (wParam <= STYLE_MAX)
6824+ return static_cast<int>(vs.styles[wParam].caseForce);
6825+ else
6826+ return 0;
6827+ case SCI_STYLEGETCHARACTERSET:
6828+ if (wParam <= STYLE_MAX)
6829+ return vs.styles[wParam].characterSet;
6830+ else
6831+ return 0;
6832+ case SCI_STYLEGETVISIBLE:
6833+ if (wParam <= STYLE_MAX)
6834+ return vs.styles[wParam].visible ? 1 : 0;
6835+ else
6836+ return 0;
6837+ case SCI_STYLEGETCHANGEABLE:
6838+ if (wParam <= STYLE_MAX)
6839+ return vs.styles[wParam].changeable ? 1 : 0;
6840+ else
6841+ return 0;
6842+ case SCI_STYLEGETHOTSPOT:
6843+ if (wParam <= STYLE_MAX)
6844+ return vs.styles[wParam].hotspot ? 1 : 0;
6845+ else
6846+ return 0;
67776847 case SCI_STYLERESETDEFAULT:
67786848 vs.ResetDefaultStyle();
67796849 InvalidateStyleRedraw();
@@ -7310,6 +7380,9 @@
73107380 InvalidateStyleRedraw();
73117381 break;
73127382
7383+ case SCI_GETHOTSPOTACTIVEFORE:
7384+ return vs.hotspotForeground.desired.AsLong();
7385+
73137386 case SCI_SETHOTSPOTACTIVEBACK:
73147387 vs.hotspotBackgroundSet = wParam != 0;
73157388 vs.hotspotBackground.desired = ColourDesired(lParam);
@@ -7316,16 +7389,25 @@
73167389 InvalidateStyleRedraw();
73177390 break;
73187391
7392+ case SCI_GETHOTSPOTACTIVEBACK:
7393+ return vs.hotspotBackground.desired.AsLong();
7394+
73197395 case SCI_SETHOTSPOTACTIVEUNDERLINE:
73207396 vs.hotspotUnderline = wParam != 0;
73217397 InvalidateStyleRedraw();
73227398 break;
73237399
7400+ case SCI_GETHOTSPOTACTIVEUNDERLINE:
7401+ return vs.hotspotUnderline ? 1 : 0;
7402+
73247403 case SCI_SETHOTSPOTSINGLELINE:
73257404 vs.hotspotSingleLine = wParam != 0;
73267405 InvalidateStyleRedraw();
73277406 break;
73287407
7408+ case SCI_GETHOTSPOTSINGLELINE:
7409+ return vs.hotspotSingleLine ? 1 : 0;
7410+
73297411 case SCI_SETPASTECONVERTENDINGS:
73307412 convertPastes = wParam != 0;
73317413 break;
--- trunk/src/Utils/scintilla/src/Editor.h (revision 9095)
+++ trunk/src/Utils/scintilla/src/Editor.h (revision 9096)
@@ -436,7 +436,7 @@
436436 void NotifyMove(int position);
437437 void NotifySavePoint(bool isSavePoint);
438438 void NotifyModifyAttempt();
439- virtual void NotifyDoubleClick(Point pt, bool shift);
439+ virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
440440 void NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt);
441441 void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt);
442442 void NotifyUpdateUI();
--- trunk/src/Utils/scintilla/src/ExternalLexer.h (revision 9095)
+++ trunk/src/Utils/scintilla/src/ExternalLexer.h (revision 9096)
@@ -10,8 +10,8 @@
1010
1111 #if PLAT_WIN
1212 #define EXT_LEXER_DECL __stdcall
13-#elif PLAT_GTK
14-#define EXT_LEXER_DECL
13+#else
14+#define EXT_LEXER_DECL
1515 #endif
1616
1717 // External Lexer function definitions...
--- trunk/src/Utils/scintilla/src/KeyWords.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/KeyWords.cxx (revision 9096)
@@ -152,6 +152,7 @@
152152 LINK_LEXER(lmCaml);
153153 LINK_LEXER(lmClw);
154154 LINK_LEXER(lmClwNoCase);
155+ LINK_LEXER(lmCmake);
155156 LINK_LEXER(lmConf);
156157 LINK_LEXER(lmCPP);
157158 LINK_LEXER(lmCPPNoCase);
--- trunk/src/Utils/scintilla/src/LexAU3.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/LexAU3.cxx (revision 9096)
@@ -42,6 +42,7 @@
4242 // Sep 27, 2005 - Fixed the SentKey lexing logic in case of multiple sentkeys.
4343 // Mar 12, 2006 - Fixed issue with <> coloring as String in stead of Operator in rare occasions.
4444 // Apr 8, 2006 - Added support for AutoIt3 Standard UDF library (SCE_AU3_UDF)
45+// Mar 9, 2007 - Fixed bug with + following a String getting the wrong Color.
4546 //
4647 // Copyright for Scintilla: 1998-2001 by Neil Hodgson <neilh@scintilla.org>
4748 // The License.txt file describes the conditions under which this software may be distributed.
@@ -424,6 +425,7 @@
424425 {
425426 sc.ForwardSetState(SCE_AU3_DEFAULT);
426427 si=0;
428+ break;
427429 }
428430 if (sc.atLineEnd)
429431 {
@@ -433,6 +435,7 @@
433435 if (!IsContinuationLine(lineCurrent,styler))
434436 {
435437 sc.SetState(SCE_AU3_DEFAULT);
438+ break;
436439 }
437440 }
438441 // find Sendkeys in a STRING
--- trunk/src/Utils/scintilla/src/LexBash.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/LexBash.cxx (revision 9096)
@@ -338,7 +338,8 @@
338338 HereDoc.Indent = false;
339339 } else if (ch == '-' // file test operators
340340 && isSingleCharOp(chNext)
341- && !isalnum((chNext2 = styler.SafeGetCharAt(i+2)))) {
341+ && !isalnum((chNext2 = styler.SafeGetCharAt(i+2)))
342+ && isspace(chPrev)) {
342343 styler.ColourTo(i + 1, SCE_SH_WORD);
343344 state = SCE_SH_DEFAULT;
344345 i++;
--- trunk/src/Utils/scintilla/src/LexCmake.cxx (nonexistent)
+++ trunk/src/Utils/scintilla/src/LexCmake.cxx (revision 9096)
@@ -0,0 +1,453 @@
1+// Scintilla source code edit control
2+/** @file LexCmake.cxx
3+ ** Lexer for Cmake
4+ **/
5+// Copyright 2007 by Cristian Adam <cristian [dot] adam [at] gmx [dot] net>
6+// based on the NSIS lexer
7+// The License.txt file describes the conditions under which this software may be distributed.
8+#include <stdlib.h>
9+#include <string.h>
10+#include <ctype.h>
11+#include <stdio.h>
12+#include <stdarg.h>
13+
14+#include "Platform.h"
15+
16+#include "PropSet.h"
17+#include "Accessor.h"
18+#include "KeyWords.h"
19+#include "Scintilla.h"
20+#include "SciLexer.h"
21+
22+
23+static bool isCmakeNumber(char ch)
24+{
25+ return(ch >= '0' && ch <= '9');
26+}
27+
28+static bool isCmakeChar(char ch)
29+{
30+ return(ch == '.' ) || (ch == '_' ) || isCmakeNumber(ch) || (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
31+}
32+
33+static bool isCmakeLetter(char ch)
34+{
35+ return(ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
36+}
37+
38+static bool CmakeNextLineHasElse(unsigned int start, unsigned int end, Accessor &styler)
39+{
40+ int nNextLine = -1;
41+ for ( unsigned int i = start; i < end; i++ ) {
42+ char cNext = styler.SafeGetCharAt( i );
43+ if ( cNext == '\n' ) {
44+ nNextLine = i+1;
45+ break;
46+ }
47+ }
48+
49+ if ( nNextLine == -1 ) // We never foudn the next line...
50+ return false;
51+
52+ for ( unsigned int firstChar = nNextLine; firstChar < end; firstChar++ ) {
53+ char cNext = styler.SafeGetCharAt( firstChar );
54+ if ( cNext == ' ' )
55+ continue;
56+ if ( cNext == '\t' )
57+ continue;
58+ if ( styler.Match(firstChar, "ELSE") || styler.Match(firstChar, "else"))
59+ return true;
60+ break;
61+ }
62+
63+ return false;
64+}
65+
66+static int calculateFoldCmake(unsigned int start, unsigned int end, int foldlevel, Accessor &styler, bool bElse)
67+{
68+ // If the word is too long, it is not what we are looking for
69+ if ( end - start > 20 )
70+ return foldlevel;
71+
72+ int newFoldlevel = foldlevel;
73+
74+ char s[20]; // The key word we are looking for has atmost 13 characters
75+ for (unsigned int i = 0; i < end - start + 1 && i < 19; i++) {
76+ s[i] = static_cast<char>( styler[ start + i ] );
77+ s[i + 1] = '\0';
78+ }
79+
80+ if ( CompareCaseInsensitive(s, "IF") == 0 || CompareCaseInsensitive(s, "WHILE") == 0
81+ || CompareCaseInsensitive(s, "MACRO") == 0 || CompareCaseInsensitive(s, "FOREACH") == 0
82+ || CompareCaseInsensitive(s, "ELSEIF") == 0 )
83+ newFoldlevel++;
84+ else if ( CompareCaseInsensitive(s, "ENDIF") == 0 || CompareCaseInsensitive(s, "ENDWHILE") == 0
85+ || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0)
86+ newFoldlevel--;
87+ else if ( bElse && CompareCaseInsensitive(s, "ELSEIF") == 0 )
88+ newFoldlevel++;
89+ else if ( bElse && CompareCaseInsensitive(s, "ELSE") == 0 )
90+ newFoldlevel++;
91+
92+ return newFoldlevel;
93+}
94+
95+static int classifyWordCmake(unsigned int start, unsigned int end, WordList *keywordLists[], Accessor &styler )
96+{
97+ char word[100] = {0};
98+ char lowercaseWord[100] = {0};
99+
100+ WordList &Commands = *keywordLists[0];
101+ WordList &Parameters = *keywordLists[1];
102+ WordList &UserDefined = *keywordLists[2];
103+
104+ for (unsigned int i = 0; i < end - start + 1 && i < 99; i++) {
105+ word[i] = static_cast<char>( styler[ start + i ] );
106+ lowercaseWord[i] = static_cast<char>(tolower(word[i]));
107+ }
108+
109+ // Check for special words...
110+ if ( CompareCaseInsensitive(word, "MACRO") == 0 || CompareCaseInsensitive(word, "ENDMACRO") == 0 )
111+ return SCE_CMAKE_MACRODEF;
112+
113+ if ( CompareCaseInsensitive(word, "IF") == 0 || CompareCaseInsensitive(word, "ENDIF") == 0 )
114+ return SCE_CMAKE_IFDEFINEDEF;
115+
116+ if ( CompareCaseInsensitive(word, "ELSEIF") == 0 || CompareCaseInsensitive(word, "ELSE") == 0 )
117+ return SCE_CMAKE_IFDEFINEDEF;
118+
119+ if ( CompareCaseInsensitive(word, "WHILE") == 0 || CompareCaseInsensitive(word, "ENDWHILE") == 0)
120+ return SCE_CMAKE_WHILEDEF;
121+
122+ if ( CompareCaseInsensitive(word, "FOREACH") == 0 || CompareCaseInsensitive(word, "ENDFOREACH") == 0)
123+ return SCE_CMAKE_FOREACHDEF;
124+
125+ if ( Commands.InList(lowercaseWord) )
126+ return SCE_CMAKE_COMMANDS;
127+
128+ if ( Parameters.InList(word) )
129+ return SCE_CMAKE_PARAMETERS;
130+
131+
132+ if ( UserDefined.InList(word) )
133+ return SCE_CMAKE_USERDEFINED;
134+
135+ if ( strlen(word) > 3 ) {
136+ if ( word[1] == '{' && word[strlen(word)-1] == '}' )
137+ return SCE_CMAKE_VARIABLE;
138+ }
139+
140+ // To check for numbers
141+ if ( isCmakeNumber( word[0] ) ) {
142+ bool bHasSimpleCmakeNumber = true;
143+ for (unsigned int j = 1; j < end - start + 1 && j < 99; j++) {
144+ if ( !isCmakeNumber( word[j] ) ) {
145+ bHasSimpleCmakeNumber = false;
146+ break;
147+ }
148+ }
149+
150+ if ( bHasSimpleCmakeNumber )
151+ return SCE_CMAKE_NUMBER;
152+ }
153+
154+ return SCE_CMAKE_DEFAULT;
155+}
156+
157+static void ColouriseCmakeDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler)
158+{
159+ int state = SCE_CMAKE_DEFAULT;
160+ if ( startPos > 0 )
161+ state = styler.StyleAt(startPos-1); // Use the style from the previous line, usually default, but could be commentbox
162+
163+ styler.StartAt( startPos );
164+ styler.GetLine( startPos );
165+
166+ unsigned int nLengthDoc = startPos + length;
167+ styler.StartSegment( startPos );
168+
169+ char cCurrChar;
170+ bool bVarInString = false;
171+ bool bClassicVarInString = false;
172+
173+ unsigned int i;
174+ for ( i = startPos; i < nLengthDoc; i++ ) {
175+ cCurrChar = styler.SafeGetCharAt( i );
176+ char cNextChar = styler.SafeGetCharAt(i+1);
177+
178+ switch (state) {
179+ case SCE_CMAKE_DEFAULT:
180+ if ( cCurrChar == '#' ) { // we have a comment line
181+ styler.ColourTo(i-1, state );
182+ state = SCE_CMAKE_COMMENT;
183+ break;
184+ }
185+ if ( cCurrChar == '"' ) {
186+ styler.ColourTo(i-1, state );
187+ state = SCE_CMAKE_STRINGDQ;
188+ bVarInString = false;
189+ bClassicVarInString = false;
190+ break;
191+ }
192+ if ( cCurrChar == '\'' ) {
193+ styler.ColourTo(i-1, state );
194+ state = SCE_CMAKE_STRINGRQ;
195+ bVarInString = false;
196+ bClassicVarInString = false;
197+ break;
198+ }
199+ if ( cCurrChar == '`' ) {
200+ styler.ColourTo(i-1, state );
201+ state = SCE_CMAKE_STRINGLQ;
202+ bVarInString = false;
203+ bClassicVarInString = false;
204+ break;
205+ }
206+
207+ // CMake Variable
208+ if ( cCurrChar == '$' || isCmakeChar(cCurrChar)) {
209+ styler.ColourTo(i-1,state);
210+ state = SCE_CMAKE_VARIABLE;
211+
212+ // If it is a number, we must check and set style here first...
213+ if ( isCmakeNumber(cCurrChar) && (cNextChar == '\t' || cNextChar == ' ' || cNextChar == '\r' || cNextChar == '\n' ) )
214+ styler.ColourTo( i, SCE_CMAKE_NUMBER);
215+
216+ break;
217+ }
218+
219+ break;
220+ case SCE_CMAKE_COMMENT:
221+ if ( cNextChar == '\n' || cNextChar == '\r' ) {
222+ // Special case:
223+ if ( cCurrChar == '\\' ) {
224+ styler.ColourTo(i-2,state);
225+ styler.ColourTo(i,SCE_CMAKE_DEFAULT);
226+ }
227+ else {
228+ styler.ColourTo(i,state);
229+ state = SCE_CMAKE_DEFAULT;
230+ }
231+ }
232+ break;
233+ case SCE_CMAKE_STRINGDQ:
234+ case SCE_CMAKE_STRINGLQ:
235+ case SCE_CMAKE_STRINGRQ:
236+
237+ if ( styler.SafeGetCharAt(i-1) == '\\' && styler.SafeGetCharAt(i-2) == '$' )
238+ break; // Ignore the next character, even if it is a quote of some sort
239+
240+ if ( cCurrChar == '"' && state == SCE_CMAKE_STRINGDQ ) {
241+ styler.ColourTo(i,state);
242+ state = SCE_CMAKE_DEFAULT;
243+ break;
244+ }
245+
246+ if ( cCurrChar == '`' && state == SCE_CMAKE_STRINGLQ ) {
247+ styler.ColourTo(i,state);
248+ state = SCE_CMAKE_DEFAULT;
249+ break;
250+ }
251+
252+ if ( cCurrChar == '\'' && state == SCE_CMAKE_STRINGRQ ) {
253+ styler.ColourTo(i,state);
254+ state = SCE_CMAKE_DEFAULT;
255+ break;
256+ }
257+
258+ if ( cNextChar == '\r' || cNextChar == '\n' ) {
259+ int nCurLine = styler.GetLine(i+1);
260+ int nBack = i;
261+ // We need to check if the previous line has a \ in it...
262+ bool bNextLine = false;
263+
264+ while ( nBack > 0 ) {
265+ if ( styler.GetLine(nBack) != nCurLine )
266+ break;
267+
268+ char cTemp = styler.SafeGetCharAt(nBack, 'a'); // Letter 'a' is safe here
269+
270+ if ( cTemp == '\\' ) {
271+ bNextLine = true;
272+ break;
273+ }
274+ if ( cTemp != '\r' && cTemp != '\n' && cTemp != '\t' && cTemp != ' ' )
275+ break;
276+
277+ nBack--;
278+ }
279+
280+ if ( bNextLine ) {
281+ styler.ColourTo(i+1,state);
282+ }
283+ if ( bNextLine == false ) {
284+ styler.ColourTo(i,state);
285+ state = SCE_CMAKE_DEFAULT;
286+ }
287+ }
288+ break;
289+
290+ case SCE_CMAKE_VARIABLE:
291+
292+ // CMake Variable:
293+ if ( cCurrChar == '$' )
294+ state = SCE_CMAKE_DEFAULT;
295+ else if ( cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' ) )
296+ state = SCE_CMAKE_DEFAULT;
297+ else if ( (isCmakeChar(cCurrChar) && !isCmakeChar( cNextChar) && cNextChar != '}') || cCurrChar == '}' ) {
298+ state = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler );
299+ styler.ColourTo( i, state);
300+ state = SCE_CMAKE_DEFAULT;
301+ }
302+ else if ( !isCmakeChar( cCurrChar ) && cCurrChar != '{' && cCurrChar != '}' ) {
303+ if ( classifyWordCmake( styler.GetStartSegment(), i-1, keywordLists, styler) == SCE_CMAKE_NUMBER )
304+ styler.ColourTo( i-1, SCE_CMAKE_NUMBER );
305+
306+ state = SCE_CMAKE_DEFAULT;
307+
308+ if ( cCurrChar == '"' ) {
309+ state = SCE_CMAKE_STRINGDQ;
310+ bVarInString = false;
311+ bClassicVarInString = false;
312+ }
313+ else if ( cCurrChar == '`' ) {
314+ state = SCE_CMAKE_STRINGLQ;
315+ bVarInString = false;
316+ bClassicVarInString = false;
317+ }
318+ else if ( cCurrChar == '\'' ) {
319+ state = SCE_CMAKE_STRINGRQ;
320+ bVarInString = false;
321+ bClassicVarInString = false;
322+ }
323+ else if ( cCurrChar == '#' ) {
324+ state = SCE_CMAKE_COMMENT;
325+ }
326+ }
327+ break;
328+ }
329+
330+ if ( state == SCE_CMAKE_COMMENT) {
331+ styler.ColourTo(i,state);
332+ }
333+ else if ( state == SCE_CMAKE_STRINGDQ || state == SCE_CMAKE_STRINGLQ || state == SCE_CMAKE_STRINGRQ ) {
334+ bool bIngoreNextDollarSign = false;
335+
336+ if ( bVarInString && cCurrChar == '$' ) {
337+ bVarInString = false;
338+ bIngoreNextDollarSign = true;
339+ }
340+ else if ( bVarInString && cCurrChar == '\\' && (cNextChar == 'n' || cNextChar == 'r' || cNextChar == 't' || cNextChar == '"' || cNextChar == '`' || cNextChar == '\'' ) ) {
341+ styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR);
342+ bVarInString = false;
343+ bIngoreNextDollarSign = false;
344+ }
345+
346+ else if ( bVarInString && !isCmakeChar(cNextChar) ) {
347+ int nWordState = classifyWordCmake( styler.GetStartSegment(), i, keywordLists, styler);
348+ if ( nWordState == SCE_CMAKE_VARIABLE )
349+ styler.ColourTo( i, SCE_CMAKE_STRINGVAR);
350+ bVarInString = false;
351+ }
352+ // Covers "${TEST}..."
353+ else if ( bClassicVarInString && cNextChar == '}' ) {
354+ styler.ColourTo( i+1, SCE_CMAKE_STRINGVAR);
355+ bClassicVarInString = false;
356+ }
357+
358+ // Start of var in string
359+ if ( !bIngoreNextDollarSign && cCurrChar == '$' && cNextChar == '{' ) {
360+ styler.ColourTo( i-1, state);
361+ bClassicVarInString = true;
362+ bVarInString = false;
363+ }
364+ else if ( !bIngoreNextDollarSign && cCurrChar == '$' ) {
365+ styler.ColourTo( i-1, state);
366+ bVarInString = true;
367+ bClassicVarInString = false;
368+ }
369+ }
370+ }
371+
372+ // Colourise remaining document
373+ styler.ColourTo(nLengthDoc-1,state);
374+}
375+
376+static void FoldCmakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler)
377+{
378+ // No folding enabled, no reason to continue...
379+ if ( styler.GetPropertyInt("fold") == 0 )
380+ return;
381+
382+ bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) == 1;
383+
384+ int lineCurrent = styler.GetLine(startPos);
385+ unsigned int safeStartPos = styler.LineStart( lineCurrent );
386+
387+ bool bArg1 = true;
388+ int nWordStart = -1;
389+
390+ int levelCurrent = SC_FOLDLEVELBASE;
391+ if (lineCurrent > 0)
392+ levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
393+ int levelNext = levelCurrent;
394+
395+ for (unsigned int i = safeStartPos; i < startPos + length; i++) {
396+ char chCurr = styler.SafeGetCharAt(i);
397+
398+ if ( bArg1 ) {
399+ if ( nWordStart == -1 && (isCmakeLetter(chCurr)) ) {
400+ nWordStart = i;
401+ }
402+ else if ( isCmakeLetter(chCurr) == false && nWordStart > -1 ) {
403+ int newLevel = calculateFoldCmake( nWordStart, i-1, levelNext, styler, foldAtElse);
404+
405+ if ( newLevel == levelNext ) {
406+ if ( foldAtElse ) {
407+ if ( CmakeNextLineHasElse(i, startPos + length, styler) )
408+ levelNext--;
409+ }
410+ }
411+ else
412+ levelNext = newLevel;
413+ bArg1 = false;
414+ }
415+ }
416+
417+ if ( chCurr == '\n' ) {
418+ if ( bArg1 && foldAtElse) {
419+ if ( CmakeNextLineHasElse(i, startPos + length, styler) )
420+ levelNext--;
421+ }
422+
423+ // If we are on a new line...
424+ int levelUse = levelCurrent;
425+ int lev = levelUse | levelNext << 16;
426+ if (levelUse < levelNext )
427+ lev |= SC_FOLDLEVELHEADERFLAG;
428+ if (lev != styler.LevelAt(lineCurrent))
429+ styler.SetLevel(lineCurrent, lev);
430+
431+ lineCurrent++;
432+ levelCurrent = levelNext;
433+ bArg1 = true; // New line, lets look at first argument again
434+ nWordStart = -1;
435+ }
436+ }
437+
438+ int levelUse = levelCurrent;
439+ int lev = levelUse | levelNext << 16;
440+ if (levelUse < levelNext)
441+ lev |= SC_FOLDLEVELHEADERFLAG;
442+ if (lev != styler.LevelAt(lineCurrent))
443+ styler.SetLevel(lineCurrent, lev);
444+}
445+
446+static const char * const cmakeWordLists[] = {
447+ "Commands",
448+ "Parameters",
449+ "UserDefined",
450+ 0,
451+ 0,};
452+
453+LexerModule lmCmake(SCLEX_CMAKE, ColouriseCmakeDoc, "cmake", FoldCmakeDoc, cmakeWordLists);
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- trunk/src/Utils/scintilla/src/LexHTML.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/LexHTML.cxx (revision 9096)
@@ -863,7 +863,9 @@
863863 styler.ColourTo(i - 1, StateToPrint);
864864 state = SCE_H_SGML_SIMPLESTRING;
865865 } else if ((ch == '-') && (chPrev == '-')) {
866- styler.ColourTo(i - 2, StateToPrint);
866+ if (static_cast<int>(styler.GetStartSegment()) <= (i - 2)) {
867+ styler.ColourTo(i - 2, StateToPrint);
868+ }
867869 state = SCE_H_SGML_COMMENT;
868870 } else if (isascii(ch) && isalpha(ch) && (chPrev == '%')) {
869871 styler.ColourTo(i - 2, StateToPrint);
@@ -1600,8 +1602,9 @@
16001602 styler.ColourTo(i - 1, StateToPrint);
16011603 state = SCE_HPHP_HSTRING_VARIABLE;
16021604 } else if (styler.Match(i, phpStringDelimiter)) {
1603- if (strlen(phpStringDelimiter) > 1)
1604- i += strlen(phpStringDelimiter) - 1;
1605+ const int psdLength = strlen(phpStringDelimiter);
1606+ if ((psdLength > 1) && ((i + psdLength) < lengthDoc))
1607+ i += psdLength - 1;
16051608 styler.ColourTo(i, StateToPrint);
16061609 state = SCE_HPHP_DEFAULT;
16071610 }
--- trunk/src/Utils/scintilla/src/LexLua.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/LexLua.cxx (revision 9096)
@@ -169,8 +169,6 @@
169169 sc.ChangeState(SCE_LUA_WORD5);
170170 } else if (keywords6.InList(s)) {
171171 sc.ChangeState(SCE_LUA_WORD6);
172- } else if (keywords6.InList(s)) {
173- sc.ChangeState(SCE_LUA_WORD6);
174172 } else if (keywords7.InList(s)) {
175173 sc.ChangeState(SCE_LUA_WORD7);
176174 } else if (keywords8.InList(s)) {
--- trunk/src/Utils/scintilla/src/LexMSSQL.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/LexMSSQL.cxx (revision 9096)
@@ -307,16 +307,16 @@
307307 inComment = (style == SCE_MSSQL_COMMENT);
308308 }
309309 if (style == SCE_MSSQL_STATEMENT) {
310- // Folding between begin and end
311- if (ch == 'b' || ch == 'e') {
310+ // Folding between begin or case and end
311+ if (ch == 'b' || ch == 'B' || ch == 'c' || ch == 'C' || ch == 'e' || ch == 'E') {
312312 for (unsigned int j = 0; j < 5; j++) {
313313 if (!iswordchar(styler[i + j])) {
314314 break;
315315 }
316- s[j] = styler[i + j];
316+ s[j] = static_cast<char>(tolower(styler[i + j]));
317317 s[j + 1] = '\0';
318318 }
319- if (strcmp(s, "begin") == 0) {
319+ if ((strcmp(s, "begin") == 0) || (strcmp(s, "case") == 0)) {
320320 levelCurrent++;
321321 }
322322 if (strcmp(s, "end") == 0) {
--- trunk/src/Utils/scintilla/src/LexOthers.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/LexOthers.cxx (revision 9096)
@@ -722,6 +722,12 @@
722722 int lastNonSpace = -1;
723723 unsigned int state = SCE_MAKE_DEFAULT;
724724 bool bSpecial = false;
725+
726+ // check for a tab character in column 0 indicating a command
727+ bool bCommand = false;
728+ if ((lengthLine > 0) && (lineBuffer[0] == '\t'))
729+ bCommand = true;
730+
725731 // Skip initial spaces
726732 while ((i < lengthLine) && isspacechar(lineBuffer[i])) {
727733 i++;
@@ -742,14 +748,24 @@
742748 styler.ColourTo(startLine + i, state);
743749 state = SCE_MAKE_DEFAULT;
744750 }
745- if (!bSpecial) {
751+
752+ // skip identifier and target styling if this is a command line
753+ if (!bSpecial && !bCommand) {
746754 if (lineBuffer[i] == ':') {
747- // We should check that no colouring was made since the beginning of the line,
748- // to avoid colouring stuff like /OUT:file
749- if (lastNonSpace >= 0)
750- styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_TARGET);
751- styler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT);
752- styler.ColourTo(startLine + i, SCE_MAKE_OPERATOR);
755+ if (((i + 1) < lengthLine) && (lineBuffer[i + 1] == '=')) {
756+ // it's a ':=', so style as an identifier
757+ if (lastNonSpace >= 0)
758+ styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_IDENTIFIER);
759+ styler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT);
760+ styler.ColourTo(startLine + i + 1, SCE_MAKE_OPERATOR);
761+ } else {
762+ // We should check that no colouring was made since the beginning of the line,
763+ // to avoid colouring stuff like /OUT:file
764+ if (lastNonSpace >= 0)
765+ styler.ColourTo(startLine + lastNonSpace, SCE_MAKE_TARGET);
766+ styler.ColourTo(startLine + i - 1, SCE_MAKE_DEFAULT);
767+ styler.ColourTo(startLine + i, SCE_MAKE_OPERATOR);
768+ }
753769 bSpecial = true; // Only react to the first ':' of the line
754770 state = SCE_MAKE_DEFAULT;
755771 } else if (lineBuffer[i] == '=') {
--- trunk/src/Utils/scintilla/src/LexTADS3.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/LexTADS3.cxx (revision 9096)
@@ -7,7 +7,7 @@
77
88 /*
99 * TADS3 is a language designed by Michael J. Roberts for the writing of text
10- * based games. TADS comes from Text Adventure Development System. It has good
10+ * based games. TADS comes from Text Adventure Development System. It has good
1111 * support for the processing and outputting of formatted text and much of a
1212 * TADS program listing consists of strings.
1313 *
@@ -48,11 +48,43 @@
4848
4949 static const int T3_SINGLE_QUOTE = 1;
5050 static const int T3_INT_EXPRESSION = 2;
51+static const int T3_INT_EXPRESSION_IN_TAG = 4;
52+static const int T3_HTML_SQUOTE = 8;
5153
5254 static inline bool IsEOL(const int ch, const int chNext) {
5355 return (ch == '\r' && chNext != '\n') || (ch == '\n');
5456 }
5557
58+/*
59+ * Test the current character to see if it's the START of an EOL sequence;
60+ * if so, skip ahead to the last character of the sequence and return true,
61+ * and if not just return false. There are a few places where we want to
62+ * check to see if a newline sequence occurs at a particular point, but
63+ * where a caller expects a subroutine to stop only upon reaching the END
64+ * of a newline sequence (in particular, CR-LF on Windows). That's why
65+ * IsEOL() above only returns true on CR if the CR isn't followed by an LF
66+ * - it doesn't want to admit that there's a newline until reaching the END
67+ * of the sequence. We meet both needs by saying that there's a newline
68+ * when we see the CR in a CR-LF, but skipping the CR before returning so
69+ * that the caller's caller will see that we've stopped at the LF.
70+ */
71+static inline bool IsEOLSkip(StyleContext &sc)
72+{
73+ /* test for CR-LF */
74+ if (sc.ch == '\r' && sc.chNext == '\n')
75+ {
76+ /* got CR-LF - skip the CR and indicate that we're at a newline */
77+ sc.Forward();
78+ return true;
79+ }
80+
81+ /*
82+ * in other cases, we have at most a 1-character newline, so do the
83+ * normal IsEOL test
84+ */
85+ return IsEOL(sc.ch, sc.chNext);
86+}
87+
5688 static inline bool IsASpaceOrTab(const int ch) {
5789 return ch == ' ' || ch == '\t';
5890 }
@@ -94,7 +126,8 @@
94126
95127 inline static void ColouriseTADS3Operator(StyleContext &sc) {
96128 int initState = sc.state;
97- sc.SetState(SCE_T3_OPERATOR);
129+ int c = sc.ch;
130+ sc.SetState(c == '{' || c == '}' ? SCE_T3_BRACE : SCE_T3_OPERATOR);
98131 sc.ForwardSetState(initState);
99132 }
100133
@@ -101,22 +134,27 @@
101134 static void ColouriseTADSHTMLString(StyleContext &sc, int &lineState) {
102135 int endState = sc.state;
103136 int chQuote = sc.ch;
137+ int chString = (lineState & T3_SINGLE_QUOTE) ? '\'' : '"';
104138 if (endState == SCE_T3_HTML_STRING) {
105139 if (lineState&T3_SINGLE_QUOTE) {
106140 endState = SCE_T3_S_STRING;
107- chQuote = '"';
141+ chString = '\'';
108142 } else if (lineState&T3_INT_EXPRESSION) {
109143 endState = SCE_T3_X_STRING;
110- chQuote = '\'';
144+ chString = '"';
111145 } else {
112- endState = SCE_T3_D_STRING;
113- chQuote = '\'';
146+ endState = SCE_T3_HTML_DEFAULT;
147+ chString = '"';
114148 }
149+ chQuote = (lineState & T3_HTML_SQUOTE) ? '\'' : '"';
115150 } else {
116151 sc.SetState(SCE_T3_HTML_STRING);
117152 sc.Forward();
118153 }
119- int chString = chQuote == '"'? '\'': '"';
154+ if (chQuote == '"')
155+ lineState &= ~T3_HTML_SQUOTE;
156+ else
157+ lineState |= T3_HTML_SQUOTE;
120158
121159 while (sc.More()) {
122160 if (IsEOL(sc.ch, sc.chNext)) {
@@ -126,12 +164,26 @@
126164 sc.ForwardSetState(endState);
127165 return;
128166 }
129- if (sc.ch == chString) {
167+ if (sc.Match('\\', static_cast<char>(chQuote))) {
168+ sc.Forward(2);
130169 sc.SetState(endState);
131170 return;
132171 }
172+ if (sc.ch == chString) {
173+ sc.SetState(SCE_T3_DEFAULT);
174+ return;
175+ }
176+
177+ if (sc.Match('<', '<')) {
178+ lineState |= T3_INT_EXPRESSION | T3_INT_EXPRESSION_IN_TAG;
179+ sc.SetState(SCE_T3_X_DEFAULT);
180+ sc.Forward(2);
181+ return;
182+ }
183+
133184 if (sc.Match('\\', static_cast<char>(chQuote))
134- || sc.Match('\\', static_cast<char>(chString))) {
185+ || sc.Match('\\', static_cast<char>(chString))
186+ || sc.Match('\\', '\\')) {
135187 sc.Forward(2);
136188 } else {
137189 sc.Forward();
@@ -198,8 +250,13 @@
198250 sc.SetState(endState);
199251 return;
200252 }
201- if (sc.ch == chString) {
253+ if (sc.Match('\\', static_cast<char>(chQuote))) {
254+ sc.Forward();
202255 ColouriseTADSHTMLString(sc, lineState);
256+ if (sc.state == SCE_T3_X_DEFAULT)
257+ break;
258+ } else if (sc.ch == chString) {
259+ ColouriseTADSHTMLString(sc, lineState);
203260 } else if (sc.ch == '=') {
204261 ColouriseTADS3Operator(sc);
205262 } else {
@@ -209,7 +266,7 @@
209266 }
210267
211268 static void ColouriseTADS3Keyword(StyleContext &sc,
212- WordList *keywordlists[], unsigned int endPos) {
269+ WordList *keywordlists[], unsigned int endPos) {
213270 char s[250];
214271 WordList &keywords = *keywordlists[0];
215272 WordList &userwords1 = *keywordlists[1];
@@ -368,7 +425,8 @@
368425 sc.Forward(2);
369426 return;
370427 }
371- if (sc.Match('\\', static_cast<char>(chQuote))) {
428+ if (sc.Match('\\', static_cast<char>(chQuote))
429+ || sc.Match('\\', '\\')) {
372430 sc.Forward(2);
373431 } else if (sc.ch == '{') {
374432 ColouriseTADS3MsgParam(sc, lineState);
@@ -376,6 +434,8 @@
376434 ColouriseTADS3LibDirective(sc, lineState);
377435 } else if (sc.ch == '<') {
378436 ColouriseTADS3HTMLTag(sc, lineState);
437+ if (sc.state == SCE_T3_X_DEFAULT)
438+ return;
379439 } else {
380440 sc.Forward();
381441 }
@@ -402,7 +462,7 @@
402462 while (sc.More()) {
403463 if (sc.ch == '\\') {
404464 sc.Forward();
405- if (IsEOL(sc.ch, sc.chNext)) {
465+ if (IsEOLSkip(sc)) {
406466 return;
407467 }
408468 }
@@ -524,12 +584,15 @@
524584 && sc.Match('>', '>')) {
525585 sc.Forward(2);
526586 sc.SetState(SCE_T3_D_STRING);
527- lineState &= ~(T3_SINGLE_QUOTE|T3_INT_EXPRESSION);
587+ if (lineState & T3_INT_EXPRESSION_IN_TAG)
588+ sc.SetState(SCE_T3_HTML_STRING);
589+ lineState &= ~(T3_SINGLE_QUOTE|T3_INT_EXPRESSION
590+ |T3_INT_EXPRESSION_IN_TAG);
528591 } else if (IsATADS3Operator(sc.ch)) {
529592 if (sc.state == SCE_T3_X_DEFAULT) {
530593 if (sc.ch == '(') {
531594 bracketLevel++;
532- } else if (sc.ch == ')') {
595+ } else if (sc.ch == ')' && bracketLevel > 0) {
533596 bracketLevel--;
534597 }
535598 }
@@ -598,7 +661,7 @@
598661 Just seen a punctuation character & now waiting for an identifier to start.
599662
600663 expectingIdentifier == false && expectingIdentifier == truee
601- We were in an identifier and have seen space. Now waiting to see a punctuation
664+ We were in an identifier and have seen space. Now waiting to see a punctuation
602665 character
603666
604667 Space, comments & preprocessor directives are always acceptable and are
@@ -630,6 +693,10 @@
630693 || style == SCE_T3_USER3;
631694 }
632695
696+static inline bool IsAnOperator(const int style) {
697+ return style == SCE_T3_OPERATOR || SCE_T3_BRACE;
698+}
699+
633700 static inline bool IsSpaceEquivalent(const int ch, const int style) {
634701 return isspace(ch)
635702 || style == SCE_T3_BLOCK_COMMENT
@@ -659,7 +726,7 @@
659726 }
660727
661728 static void FoldTADS3Doc(unsigned int startPos, int length, int initStyle,
662- WordList *[], Accessor &styler) {
729+ WordList *[], Accessor &styler) {
663730 unsigned int endPos = startPos + length;
664731 int lineCurrent = styler.GetLine(startPos);
665732 int levelCurrent = SC_FOLDLEVELBASE;
@@ -751,7 +818,7 @@
751818 }
752819
753820 } else if (levelNext == SC_FOLDLEVELBASE+1 && seenStart
754- && ch == ';' && style == SCE_T3_OPERATOR ) {
821+ && ch == ';' && IsAnOperator(style)) {
755822 levelNext--;
756823 seenStart = 0;
757824 } else if (style == SCE_T3_BLOCK_COMMENT) {
@@ -770,7 +837,7 @@
770837 } else if (IsStringTransition(style, styleNext)) {
771838 levelNext--;
772839 }
773- } else if (style == SCE_T3_OPERATOR) {
840+ } else if (IsAnOperator(style)) {
774841 if (ch == '{' || ch == '[') {
775842 // Measure the minimum before a '{' to allow
776843 // folding on "} else {"
--- trunk/src/Utils/scintilla/src/PropSet.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/PropSet.cxx (revision 9096)
@@ -1056,11 +1056,14 @@
10561056 * counted in the length.
10571057 */
10581058 static unsigned int LengthWord(const char *word, char otherSeparator) {
1059+ const char *endWord = 0;
1060+ // Find an otherSeparator
1061+ if (otherSeparator)
1062+ endWord = strchr(word, otherSeparator);
10591063 // Find a '('. If that fails go to the end of the string.
1060- const char *endWord = strchr(word, '(');
1061- if (!endWord && otherSeparator)
1062- endWord = strchr(word, otherSeparator);
10631064 if (!endWord)
1065+ endWord = strchr(word, '(');
1066+ if (!endWord)
10641067 endWord = word + strlen(word);
10651068 // Last case always succeeds so endWord != 0
10661069
--- trunk/src/Utils/scintilla/src/RESearch.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/src/RESearch.cxx (revision 9096)
@@ -16,6 +16,7 @@
1616 * Converted to modern function prototypes.
1717 * Put all global/static variables into an object so this code can be
1818 * used from multiple threads, etc.
19+ * Some extensions by Philippe Lhoste PhiLho(a)GMX.net
1920 *
2021 * These routines are the PUBLIC DOMAIN equivalents of regex
2122 * routines as found in 4.nBSD UN*X, with minor extensions.
@@ -58,31 +59,38 @@
5859 * [2] . matches any character.
5960 *
6061 * [3] \ matches the character following it, except:
61- * - \a, \b, \f, \n, \t, \v match the
62- * corresponding C escape char;
62+ * - \a, \b, \f, \n, \r, \t, \v match the corresponding C
63+ * escape char, respectively BEL, BS, FF, LF, CR, TAB and VT;
64+ * Note that \r and \n are never matched because Scintilla
65+ * regex searches are made line per line
66+ * (stripped of end-of-line chars).
6367 * - if not in posix mode, when followed by a
6468 * left or right round bracket (see [7]);
6569 * - when followed by a digit 1 to 9 (see [8]);
6670 * - when followed by a left or right angle bracket
67- * (see [9]).
68- * It is used as an escape character for all
69- * other meta-characters, and itself. When used
70- * in a set ([4]), it is treated as an ordinary
71- * character (except for escape chars).
71+ * (see [9]);
72+ * - when followed by d, D, s, S, w or W (see [10]);
73+ * - when followed by x and two hexa digits (see [11].
74+ * Backslash is used as an escape character for all
75+ * other meta-characters, and itself.
7276 *
7377 * [4] [set] matches one of the characters in the set.
7478 * If the first character in the set is "^",
75- * it matches a character NOT in the set, i.e.
76- * complements the set. A shorthand S-E (start-end)
77- * is used to specify a set of characters S upto
78- * E, inclusive. The special characters "]" and
79- * "-" have no special meaning if they appear
80- * as the first chars in the set. To include both,
81- * put - first: [-]A-Z]:
82- * [-]|] matches these 2 chars,
83- * []-|] matches from ] to | chars.
79+ * it matches the characters NOT in the set, i.e.
80+ * complements the set. A shorthand S-E (start dash end)
81+ * is used to specify a set of characters S up to
82+ * E, inclusive. S and E must be characters, otherwise
83+ * the dash is taken literally (eg. in expression [\d-a]).
84+ * The special characters "]" and "-" have no special
85+ * meaning if they appear as the first chars in the set.
86+ * To include both, put - first: [-]A-Z]
87+ * (or just backslash them).
8488 * examples: match:
8589 *
90+ * [-]|] matches these 3 chars,
91+ *
92+ * []-|] matches from ] to | chars
93+ *
8694 * [a-z] any lowercase alpha
8795 *
8896 * [^-]] any char except - and ]
@@ -92,13 +100,15 @@
92100 *
93101 * [a-zA-Z] any alpha
94102 *
95- * [5] * any regular expression form [1] to [4], followed by
96- * closure char (*) matches zero or more matches of
97- * that form.
103+ * [5] * any regular expression form [1] to [4]
104+ * (except [7], [8] and [9] forms of [3]),
105+ * followed by closure char (*)
106+ * matches zero or more matches of that form.
98107 *
99108 * [6] + same as [5], except it matches one or more.
109+ * Both [5] and [6] are greedy (they match as much as possible).
100110 *
101- * [7] a regular expression in the form [1] to [10], enclosed
111+ * [7] a regular expression in the form [1] to [12], enclosed
102112 * as \(form\) (or (form) with posix flag) matches what
103113 * form matches. The enclosure creates a set of tags,
104114 * used for [8] and for pattern substitution.
@@ -112,14 +122,30 @@
112122 * pattern matching to the beginning of a word, and/or
113123 * the end of a word. A word is defined to be a character
114124 * string beginning and/or ending with the characters
115- * A-Z a-z 0-9 and _. It must also be preceded and/or
125+ * A-Z a-z 0-9 and _. Scintilla extends this definition
126+ * by user setting. The word must also be preceded and/or
116127 * followed by any character outside those mentioned.
117128 *
118- * [10] a composite regular expression xy where x and y
119- * are in the form [1] to [10] matches the longest
129+ * [10] \l a backslash followed by d, D, s, S, w or W,
130+ * becomes a character class (both inside and
131+ * outside sets []).
132+ * d: decimal digits
133+ * D: any char except decimal digits
134+ * s: whitespace (space, \t \n \r \f \v)
135+ * S: any char except whitespace (see above)
136+ * w: alphanumeric & underscore (changed by user setting)
137+ * W: any char except alphanumeric & underscore (see above)
138+ *
139+ * [11] \xHH a backslash followed by x and two hexa digits,
140+ * becomes the character whose Ascii code is equal
141+ * to these digits. If not followed by two digits,
142+ * it is 'x' char itself.
143+ *
144+ * [12] a composite regular expression xy where x and y
145+ * are in the form [1] to [11] matches the longest
120146 * match of x followed by a match for y.
121147 *
122- * [11] ^ a regular expression starting with a ^ character
148+ * [13] ^ a regular expression starting with a ^ character
123149 * $ and/or ending with a $ character, restricts the
124150 * pattern matching to the beginning of the line,
125151 * or the end of line. [anchors] Elsewhere in the
@@ -143,11 +169,11 @@
143169 *
144170 * Notes:
145171 *
146- * This implementation uses a bit-set representation for character
147- * classes for speed and compactness. Each character is represented
148- * by one bit in a 256-bit block. Thus, CCL always takes a
172+ * This implementation uses a bit-set representation for character
173+ * classes for speed and compactness. Each character is represented
174+ * by one bit in a 256-bit block. Thus, CCL always takes a
149175 * constant 32 bytes in the internal nfa, and RESearch::Execute does a single
150- * bit comparison to locate the character in the set.
176+ * bit comparison to locate the character in the set.
151177 *
152178 * Examples:
153179 *
@@ -204,7 +230,7 @@
204230 #define BLKIND 0370
205231 #define BITIND 07
206232
207-const char bitarr[] = {1,2,4,8,16,32,64,'\200'};
233+const char bitarr[] = { 1, 2, 4, 8, 16, 32, 64, '\200' };
208234
209235 #define badpat(x) (*nfa = END, x)
210236
@@ -212,7 +238,7 @@
212238 * Character classification table for word boundary operators BOW
213239 * and EOW is passed in by the creator of this object (Scintilla
214240 * Document). The Document default state is that word chars are:
215- * 0-9,a-z, A-Z and _
241+ * 0-9, a-z, A-Z and _
216242 */
217243
218244 RESearch::RESearch(CharClassify *charClassTable) {
@@ -227,14 +253,14 @@
227253 void RESearch::Init() {
228254 sta = NOP; /* status of lastpat */
229255 bol = 0;
230- for (int i=0; i<MAXTAG; i++)
256+ for (int i = 0; i < MAXTAG; i++)
231257 pat[i] = 0;
232- for (int j=0; j<BITBLK; j++)
258+ for (int j = 0; j < BITBLK; j++)
233259 bittab[j] = 0;
234260 }
235261
236262 void RESearch::Clear() {
237- for (int i=0; i<MAXTAG; i++) {
263+ for (int i = 0; i < MAXTAG; i++) {
238264 delete []pat[i];
239265 pat[i] = 0;
240266 bopat[i] = NOTFOUND;
@@ -244,12 +270,12 @@
244270
245271 bool RESearch::GrabMatches(CharacterIndexer &ci) {
246272 bool success = true;
247- for (unsigned int i=0; i<MAXTAG; i++) {
273+ for (unsigned int i = 0; i < MAXTAG; i++) {
248274 if ((bopat[i] != NOTFOUND) && (eopat[i] != NOTFOUND)) {
249275 unsigned int len = eopat[i] - bopat[i];
250276 pat[i] = new char[len + 1];
251277 if (pat[i]) {
252- for (unsigned int j=0; j<len; j++)
278+ for (unsigned int j = 0; j < len; j++)
253279 pat[i][j] = ci.CharAt(bopat[i] + j);
254280 pat[i][len] = '\0';
255281 } else {
@@ -260,20 +286,20 @@
260286 return success;
261287 }
262288
263-void RESearch::ChSet(char c) {
289+void RESearch::ChSet(unsigned char c) {
264290 bittab[((c) & BLKIND) >> 3] |= bitarr[(c) & BITIND];
265291 }
266292
267-void RESearch::ChSetWithCase(char c, bool caseSensitive) {
293+void RESearch::ChSetWithCase(unsigned char c, bool caseSensitive) {
268294 if (caseSensitive) {
269295 ChSet(c);
270296 } else {
271297 if ((c >= 'a') && (c <= 'z')) {
272298 ChSet(c);
273- ChSet(static_cast<char>(c - 'a' + 'A'));
299+ ChSet(static_cast<unsigned char>(c - 'a' + 'A'));
274300 } else if ((c >= 'A') && (c <= 'Z')) {
275301 ChSet(c);
276- ChSet(static_cast<char>(c - 'A' + 'a'));
302+ ChSet(static_cast<unsigned char>(c - 'A' + 'a'));
277303 } else {
278304 ChSet(c);
279305 }
@@ -280,7 +306,7 @@
280306 }
281307 }
282308
283-const char escapeValue(char ch) {
309+const unsigned char escapeValue(unsigned char ch) {
284310 switch (ch) {
285311 case 'a': return '\a';
286312 case 'b': return '\b';
@@ -293,6 +319,119 @@
293319 return 0;
294320 }
295321
322+static int GetHexaChar(unsigned char hd1, unsigned char hd2) {
323+ int hexValue = 0;
324+ if (hd1 >= '0' && hd1 <= '9') {
325+ hexValue += 16 * (hd1 - '0');
326+ } else if (hd1 >= 'A' && hd1 <= 'F') {
327+ hexValue += 16 * (hd1 - 'A' + 10);
328+ } else if (hd1 >= 'a' && hd1 <= 'f') {
329+ hexValue += 16 * (hd1 - 'a' + 10);
330+ } else
331+ return -1;
332+ if (hd2 >= '0' && hd2 <= '9') {
333+ hexValue += hd2 - '0';
334+ } else if (hd2 >= 'A' && hd2 <= 'F') {
335+ hexValue += hd2 - 'A' + 10;
336+ } else if (hd2 >= 'a' && hd2 <= 'f') {
337+ hexValue += hd2 - 'a' + 10;
338+ } else
339+ return -1;
340+ return hexValue;
341+}
342+
343+/**
344+ * Called when the parser finds a backslash not followed
345+ * by a valid expression (like \( in non-Posix mode).
346+ * @param pat: pointer on the char after the backslash.
347+ * @param incr: (out) number of chars to skip after expression evaluation.
348+ * @return the char if it resolves to a simple char,
349+ * or -1 for a char class. In this case, bittab is changed.
350+ */
351+int RESearch::GetBackslashExpression(
352+ const char *pat,
353+ int &incr) {
354+ // Since error reporting is primitive and messages are not used anyway,
355+ // I choose to interpret unexpected syntax in a logical way instead
356+ // of reporting errors. Otherwise, we can stick on, eg., PCRE behavior.
357+ incr = 0; // Most of the time, will skip the char "naturally".
358+ int c;
359+ int result = -1;
360+ unsigned char bsc = *pat;
361+ if (!bsc) {
362+ // Avoid overrun
363+ result = '\\'; // \ at end of pattern, take it literally
364+ return result;
365+ }
366+
367+ switch (bsc) {
368+ case 'a':
369+ case 'b':
370+ case 'n':
371+ case 'f':
372+ case 'r':
373+ case 't':
374+ case 'v':
375+ result = escapeValue(bsc);
376+ break;
377+ case 'x': {
378+ unsigned char hd1 = *(pat + 1);
379+ unsigned char hd2 = *(pat + 2);
380+ int hexValue = GetHexaChar(hd1, hd2);
381+ if (hexValue >= 0) {
382+ result = hexValue;
383+ incr = 2; // Must skip the digits
384+ } else {
385+ result = 'x'; // \x without 2 digits: see it as 'x'
386+ }
387+ }
388+ break;
389+ case 'd':
390+ for (c = '0'; c <= '9'; c++) {
391+ ChSet(static_cast<unsigned char>(c));
392+ }
393+ break;
394+ case 'D':
395+ for (c = 0; c < MAXCHR; c++) {
396+ if (c < '0' || c > '9') {
397+ ChSet(static_cast<unsigned char>(c));
398+ }
399+ }
400+ break;
401+ case 's':
402+ ChSet(' ');
403+ ChSet('\t');
404+ ChSet('\n');
405+ ChSet('\r');
406+ ChSet('\f');
407+ ChSet('\v');
408+ break;
409+ case 'S':
410+ for (c = 0; c < MAXCHR; c++) {
411+ if (c != ' ' && !(c >= 0x09 && c <= 0x0D)) {
412+ ChSet(static_cast<unsigned char>(c));
413+ }
414+ }
415+ case 'w':
416+ for (c = 0; c < MAXCHR; c++) {
417+ if (iswordc(static_cast<unsigned char>(c))) {
418+ ChSet(static_cast<unsigned char>(c));
419+ }
420+ }
421+ break;
422+ case 'W':
423+ for (c = 0; c < MAXCHR; c++) {
424+ if (!iswordc(static_cast<unsigned char>(c))) {
425+ ChSet(static_cast<unsigned char>(c));
426+ }
427+ }
428+ break;
429+ default:
430+ result = bsc;
431+ }
432+ return result;
433+}
434+
296435 const char *RESearch::Compile(const char *pat, int length, bool caseSensitive, bool posix) {
297436 char *mp=nfa; /* nfa pointer */
298437 char *lp; /* saved pointer */
@@ -304,7 +443,7 @@
304443
305444 int n;
306445 char mask; /* xor mask -CCL/NCL */
307- int c1, c2;
446+ int c1, c2, prevChar;
308447
309448 if (!pat || !length)
310449 if (sta)
@@ -318,7 +457,7 @@
318457 if (mp > mpMax)
319458 return badpat("Pattern too long");
320459 lp = mp;
321- switch(*p) {
460+ switch (*p) {
322461
323462 case '.': /* match any char */
324463 *mp++ = ANY;
@@ -344,6 +483,7 @@
344483
345484 case '[': /* match char class */
346485 *mp++ = CCL;
486+ prevChar = 0;
347487
348488 i++;
349489 if (*++p == '^') {
@@ -355,41 +495,89 @@
355495
356496 if (*p == '-') { /* real dash */
357497 i++;
498+ prevChar = *p;
358499 ChSet(*p++);
359500 }
360501 if (*p == ']') { /* real brace */
361502 i++;
503+ prevChar = *p;
362504 ChSet(*p++);
363505 }
364506 while (*p && *p != ']') {
365- if (*p == '-' && *(p+1) && *(p+1) != ']') {
366- i++;
367- p++;
368- c1 = *(p-2) + 1;
369- i++;
370- c2 = *p++;
371- while (c1 <= c2) {
372- ChSetWithCase(static_cast<char>(c1++), caseSensitive);
507+ if (*p == '-') {
508+ if (prevChar < 0) {
509+ // Previous def. was a char class like \d, take dash literally
510+ prevChar = *p;
511+ ChSet(*p);
512+ } else if (*(p+1)) {
513+ if (*(p+1) != ']') {
514+ c1 = prevChar + 1;
515+ i++;
516+ c2 = *++p;
517+ if (c2 == '\\') {
518+ if (!*(p+1)) // End of RE
519+ return badpat("Missing ]");
520+ else {
521+ i++;
522+ p++;
523+ int incr;
524+ c2 = GetBackslashExpression(p, incr);
525+ i += incr;
526+ p += incr;
527+ if (c2 >= 0) {
528+ // Convention: \c (c is any char) is case sensitive, whatever the option
529+ ChSet(static_cast<unsigned char>(c2));
530+ prevChar = c2;
531+ } else {
532+ // bittab is already changed
533+ prevChar = -1;
534+ }
535+ }
536+ }
537+ if (prevChar < 0) {
538+ // Char after dash is char class like \d, take dash literally
539+ prevChar = '-';
540+ ChSet('-');
541+ } else {
542+ // Put all chars between c1 and c2 included in the char set
543+ while (c1 <= c2) {
544+ ChSetWithCase(static_cast<unsigned char>(c1++), caseSensitive);
545+ }
546+ }
547+ } else {
548+ // Dash before the ], take it literally
549+ prevChar = *p;
550+ ChSet(*p);
551+ }
552+ } else {
553+ return badpat("Missing ]");
373554 }
374555 } else if (*p == '\\' && *(p+1)) {
375556 i++;
376557 p++;
377- char escape = escapeValue(*p);
378- if (escape)
379- ChSetWithCase(escape, caseSensitive);
380- else
381- ChSetWithCase(*p, caseSensitive);
382- i++;
383- p++;
558+ int incr;
559+ int c = GetBackslashExpression(p, incr);
560+ i += incr;
561+ p += incr;
562+ if (c >= 0) {
563+ // Convention: \c (c is any char) is case sensitive, whatever the option
564+ ChSet(static_cast<unsigned char>(c));
565+ prevChar = c;
566+ } else {
567+ // bittab is already changed
568+ prevChar = -1;
569+ }
384570 } else {
385- i++;
386- ChSetWithCase(*p++, caseSensitive);
571+ prevChar = *p;
572+ ChSetWithCase(*p, caseSensitive);
387573 }
574+ i++;
575+ p++;
388576 }
389577 if (!*p)
390578 return badpat("Missing ]");
391579
392- for (n = 0; n < BITBLK; bittab[n++] = (char) 0)
580+ for (n = 0; n < BITBLK; bittab[n++] = 0)
393581 *mp++ = static_cast<char>(mask ^ bittab[n]);
394582
395583 break;
@@ -401,7 +589,7 @@
401589 lp = sp; /* previous opcode */
402590 if (*lp == CLO) /* equivalence... */
403591 break;
404- switch(*lp) {
592+ switch (*lp) {
405593
406594 case BOL:
407595 case BOT:
@@ -429,8 +617,7 @@
429617
430618 case '\\': /* tags, backrefs... */
431619 i++;
432- switch(*++p) {
433-
620+ switch (*++p) {
434621 case '<':
435622 *mp++ = BOW;
436623 break;
@@ -454,20 +641,9 @@
454641 if (tagc > n) {
455642 *mp++ = static_cast<char>(REF);
456643 *mp++ = static_cast<char>(n);
457- }
458- else
644+ } else
459645 return badpat("Undetermined reference");
460646 break;
461- case 'a':
462- case 'b':
463- case 'n':
464- case 'f':
465- case 'r':
466- case 't':
467- case 'v':
468- *mp++ = CHR;
469- *mp++ = escapeValue(*p);
470- break;
471647 default:
472648 if (!posix && *p == '(') {
473649 if (tagc < MAXTAG) {
@@ -474,8 +650,7 @@
474650 tagstk[++tagi] = tagc;
475651 *mp++ = BOT;
476652 *mp++ = static_cast<char>(tagc++);
477- }
478- else
653+ } else
479654 return badpat("Too many \\(\\) pairs");
480655 } else if (!posix && *p == ')') {
481656 if (*sp == BOT)
@@ -483,12 +658,22 @@
483658 if (tagi > 0) {
484659 *mp++ = static_cast<char>(EOT);
485660 *mp++ = static_cast<char>(tagstk[tagi--]);
486- }
487- else
661+ } else
488662 return badpat("Unmatched \\)");
489663 } else {
490- *mp++ = CHR;
491- *mp++ = *p;
664+ int incr;
665+ int c = GetBackslashExpression(p, incr);
666+ i += incr;
667+ p += incr;
668+ if (c >= 0) {
669+ *mp++ = CHR;
670+ *mp++ = static_cast<unsigned char>(c);
671+ } else {
672+ *mp++ = CCL;
673+ mask = 0;
674+ for (n = 0; n < BITBLK; bittab[n++] = 0)
675+ *mp++ = static_cast<char>(mask ^ bittab[n]);
676+ }
492677 }
493678 }
494679 break;
@@ -499,8 +684,7 @@
499684 tagstk[++tagi] = tagc;
500685 *mp++ = BOT;
501686 *mp++ = static_cast<char>(tagc++);
502- }
503- else
687+ } else
504688 return badpat("Too many () pairs");
505689 } else if (posix && *p == ')') {
506690 if (*sp == BOT)
@@ -508,18 +692,22 @@
508692 if (tagi > 0) {
509693 *mp++ = static_cast<char>(EOT);
510694 *mp++ = static_cast<char>(tagstk[tagi--]);
511- }
512- else
695+ } else
513696 return badpat("Unmatched )");
514- } else if (caseSensitive) {
515- *mp++ = CHR;
516- *mp++ = *p;
517697 } else {
518- *mp++ = CCL;
519- mask = 0;
520- ChSetWithCase(*p, false);
521- for (n = 0; n < BITBLK; bittab[n++] = (char) 0)
522- *mp++ = static_cast<char>(mask ^ bittab[n]);
698+ unsigned char c = *p;
699+ if (!c) // End of RE
700+ c = '\\'; // We take it as raw backslash
701+ if (caseSensitive || !iswordc(c)) {
702+ *mp++ = CHR;
703+ *mp++ = c;
704+ } else {
705+ *mp++ = CCL;
706+ mask = 0;
707+ ChSetWithCase(c, false);
708+ for (n = 0; n < BITBLK; bittab[n++] = 0)
709+ *mp++ = static_cast<char>(mask ^ bittab[n]);
710+ }
523711 }
524712 break;
525713 }
@@ -553,9 +741,8 @@
553741 * respectively.
554742 *
555743 */
556-
557744 int RESearch::Execute(CharacterIndexer &ci, int lp, int endp) {
558- char c;
745+ unsigned char c;
559746 int ep = NOTFOUND;
560747 char *ap = nfa;
561748
@@ -564,7 +751,7 @@
564751
565752 Clear();
566753
567- switch(*ap) {
754+ switch (*ap) {
568755
569756 case BOL: /* anchored: match from BOL only */
570757 ep = PMatch(ci, lp, endp, ap);
@@ -651,7 +838,7 @@
651838 int are; /* to save the line ptr. */
652839
653840 while ((op = *ap++) != END)
654- switch(op) {
841+ switch (op) {
655842
656843 case CHR:
657844 if (ci.CharAt(lp++) != *ap++)
@@ -699,7 +886,7 @@
699886 break;
700887 case CLO:
701888 are = lp;
702- switch(*ap) {
889+ switch (*ap) {
703890
704891 case ANY:
705892 while (lp < endp)
@@ -749,7 +936,7 @@
749936 * tagged subpattern does not exist, null is substituted.
750937 */
751938 int RESearch::Substitute(CharacterIndexer &ci, char *src, char *dst) {
752- char c;
939+ unsigned char c;
753940 int pin;
754941 int bp;
755942 int ep;
@@ -758,7 +945,7 @@
758945 return 0;
759946
760947 while ((c = *src++) != 0) {
761- switch(c) {
948+ switch (c) {
762949
763950 case '&':
764951 pin = 0;
@@ -783,6 +970,7 @@
783970 return 0;
784971 }
785972 }
786- *dst = (char) 0;
973+ *dst = '\0';
787974 return 1;
788975 }
976+
--- trunk/src/Utils/scintilla/src/RESearch.h (revision 9095)
+++ trunk/src/Utils/scintilla/src/RESearch.h (revision 9096)
@@ -34,9 +34,9 @@
3434 int Execute(CharacterIndexer &ci, int lp, int endp);
3535 int Substitute(CharacterIndexer &ci, char *src, char *dst);
3636
37- enum {MAXTAG=10};
38- enum {MAXNFA=2048};
39- enum {NOTFOUND=-1};
37+ enum { MAXTAG=10 };
38+ enum { MAXNFA=2048 };
39+ enum { NOTFOUND=-1 };
4040
4141 int bopat[MAXTAG];
4242 int eopat[MAXTAG];
@@ -45,16 +45,17 @@
4545 private:
4646 void Init();
4747 void Clear();
48- void ChSet(char c);
49- void ChSetWithCase(char c, bool caseSensitive);
48+ void ChSet(unsigned char c);
49+ void ChSetWithCase(unsigned char c, bool caseSensitive);
50+ int GetBackslashExpression(const char *pat, int &incr);
5051
5152 int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap);
5253
5354 int bol;
54- int tagstk[MAXTAG]; /* subpat tag stack */
55+ int tagstk[MAXTAG]; /* subpat tag stack */
5556 char nfa[MAXNFA]; /* automaton */
5657 int sta;
57- char bittab[BITBLK]; /* bit table for CCL pre-set bits */
58+ unsigned char bittab[BITBLK]; /* bit table for CCL pre-set bits */
5859 int failure;
5960 CharClassify *charClass;
6061 bool iswordc(unsigned char x) {
@@ -63,3 +64,4 @@
6364 };
6465
6566 #endif
67+
--- trunk/src/Utils/scintilla/src/SplitVector.h (revision 9095)
+++ trunk/src/Utils/scintilla/src/SplitVector.h (revision 9096)
@@ -49,9 +49,7 @@
4949 }
5050 }
5151
52-public:
53- /// Construct a split buffer.
54- SplitVector() {
52+ void Init() {
5553 body = NULL;
5654 growSize = 8;
5755 size = 0;
@@ -60,13 +58,17 @@
6058 gapLength = 0;
6159 }
6260
61+public:
62+ /// Construct a split buffer.
63+ SplitVector() {
64+ Init();
65+ }
66+
6367 ~SplitVector() {
6468 delete []body;
6569 body = NULL;
6670 }
6771
68- void Create(int initialLength_, int growSize_);
69-
7072 int GetGrowSize() const {
7173 return growSize;
7274 }
@@ -212,7 +214,11 @@
212214 if ((position < 0) || ((position + deleteLength) > lengthBody)) {
213215 return;
214216 }
215- if (deleteLength > 0) {
217+ if ((position == 0) && (deleteLength == lengthBody)) {
218+ // Full deallocation returns storage and is faster
219+ delete []body;
220+ Init();
221+ } else if (deleteLength > 0) {
216222 GapTo(position);
217223 lengthBody -= deleteLength;
218224 gapLength += deleteLength;
--- trunk/src/Utils/scintilla/version.txt (revision 9095)
+++ trunk/src/Utils/scintilla/version.txt (revision 9096)
@@ -1 +1 @@
1-172
1+173
--- trunk/src/Utils/scintilla/win32/PlatWin.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/win32/PlatWin.cxx (revision 9096)
@@ -633,7 +633,9 @@
633633 ::DeleteObject(hbmMem);
634634 ::DeleteObject(hMemDC);
635635 } else {
636- RectangleDraw(rc, outline, fill);
636+ BrushColor(outline);
637+ RECT rcw = RectFromPRectangle(rc);
638+ FrameRect(hdc, &rcw, brush);
637639 }
638640 }
639641
@@ -1053,7 +1055,7 @@
10531055 };
10541056
10551057 #define _ROUND2(n,pow2) \
1056- ( ( (n) + (pow2) - 1) & ~((pow2) - 1) )
1058+ ( ( (n) + (pow2) - 1) & ~((pow2) - 1) )
10571059
10581060 class LineToItem {
10591061 char *words;
@@ -1464,9 +1466,9 @@
14641466 if (numword) {
14651467 int pixId = 0;
14661468 char ch;
1467- while ( (ch = *++numword) != '\0' ) {
1468- pixId = 10 * pixId + (ch - '0');
1469- }
1469+ while ((ch = *++numword) != '\0') {
1470+ pixId = 10 * pixId + (ch - '0');
1471+ }
14701472 item->pixId = pixId;
14711473 } else {
14721474 item->pixId = -1;
@@ -2030,7 +2032,7 @@
20302032 };
20312033
20322034 DynamicLibrary *DynamicLibrary::Load(const char *modulePath) {
2033- return static_cast<DynamicLibrary *>( new DynamicLibraryImpl(modulePath) );
2035+ return static_cast<DynamicLibrary *>(new DynamicLibraryImpl(modulePath));
20342036 }
20352037
20362038 ColourDesired Platform::Chrome() {
@@ -2161,6 +2163,8 @@
21612163 onNT = osv.dwPlatformId == VER_PLATFORM_WIN32_NT;
21622164 ::InitializeCriticalSection(&crPlatformLock);
21632165 hinstPlatformRes = reinterpret_cast<HINSTANCE>(hInstance);
2166+ // This may be called from DllMain, in which case the call to LoadLibrary
2167+ // is bad because it can upset the DLL load order.
21642168 if (!hDLLImage) {
21652169 hDLLImage = ::LoadLibrary(TEXT("Msimg32"));
21662170 }
--- trunk/src/Utils/scintilla/win32/ScintillaWin.cxx (revision 9095)
+++ trunk/src/Utils/scintilla/win32/ScintillaWin.cxx (revision 9096)
@@ -156,6 +156,7 @@
156156
157157 CLIPFORMAT cfColumnSelect;
158158
159+ HRESULT hrOle;
159160 DropSource ds;
160161 DataObject dob;
161162 DropTarget dt;
@@ -199,7 +200,7 @@
199200 virtual void NotifyFocus(bool focus);
200201 virtual int GetCtrlID();
201202 virtual void NotifyParent(SCNotification scn);
202- virtual void NotifyDoubleClick(Point pt, bool shift);
203+ virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
203204 virtual void Copy();
204205 virtual bool CanPaste();
205206 virtual void Paste();
@@ -293,6 +294,8 @@
293294 cfColumnSelect = static_cast<CLIPFORMAT>(
294295 ::RegisterClipboardFormat(TEXT("MSDEVColumnSelect")));
295296
297+ hrOle = E_FAIL;
298+
296299 wMain = hwnd;
297300
298301 dob.sci = this;
@@ -312,7 +315,7 @@
312315 // Initialize COM. If the app has already done this it will have
313316 // no effect. If the app hasnt, we really shouldnt ask them to call
314317 // it just so this internal feature works.
315- ::OleInitialize(NULL);
318+ hrOle = ::OleInitialize(NULL);
316319 }
317320
318321 void ScintillaWin::Finalise() {
@@ -321,7 +324,9 @@
321324 SetIdle(false);
322325 DestroySystemCaret();
323326 ::RevokeDragDrop(MainHWND());
324- ::OleUninitialize();
327+ if (SUCCEEDED(hrOle)) {
328+ ::OleUninitialize();
329+ }
325330 }
326331
327332 HWND ScintillaWin::MainHWND() {
@@ -1168,9 +1173,9 @@
11681173 GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
11691174 }
11701175
1171-void ScintillaWin::NotifyDoubleClick(Point pt, bool shift) {
1176+void ScintillaWin::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
11721177 //Platform::DebugPrintf("ScintillaWin Double click 0\n");
1173- ScintillaBase::NotifyDoubleClick(pt, shift);
1178+ ScintillaBase::NotifyDoubleClick(pt, shift, ctrl, alt);
11741179 // Send myself a WM_LBUTTONDBLCLK, so the container can handle it too.
11751180 ::SendMessage(MainHWND(),
11761181 WM_LBUTTONDBLCLK,
Show on old repository browser