From 1753bcc2b72e72a58faff5cc0ffb546aebf44deb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 3 Aug 2011 11:46:43 +1000 Subject: Fixed 64-bit warnings. --- lexers/LexHTML.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index b54401805..a20796387 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -57,7 +57,7 @@ inline bool IsOperator(int ch) { } static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int end, char *s, size_t len) { - size_t i = 0; + unsigned int i = 0; for (; (i < end - start + 1) && (i < len-1); i++) { s[i] = static_cast(MakeLowerCase(styler[start + i])); } @@ -66,7 +66,7 @@ static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int en static const char *GetNextWord(Accessor &styler, unsigned int start, char *s, size_t sLen) { - size_t i = 0; + unsigned int i = 0; for (; i < sLen-1; i++) { char ch = static_cast(styler.SafeGetCharAt(start + i)); if ((i == 0) && !IsAWordStart(ch)) @@ -960,8 +960,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i, SCE_H_ASP); if (ch != '%' && ch != '$' && ch != '/') { - i += strlen(makoBlockType); - visibleChars += strlen(makoBlockType); + i += static_cast(strlen(makoBlockType)); + visibleChars += static_cast(strlen(makoBlockType)); if (keywords4.InList(makoBlockType)) styler.ColourTo(i, SCE_HP_WORD); else @@ -1983,7 +1983,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; } else if (isLineEnd(chPrev)) { - const int psdLength = strlen(phpStringDelimiter); + const int psdLength = static_cast(strlen(phpStringDelimiter)); const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); if (isLineEnd(chAfterPsd) || @@ -2006,7 +2006,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_HPHP_DEFAULT; } } else if (isLineEnd(chPrev) && styler.Match(i, phpStringDelimiter)) { - const int psdLength = strlen(phpStringDelimiter); + const int psdLength = static_cast(strlen(phpStringDelimiter)); const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); if (isLineEnd(chAfterPsd) || -- cgit v1.2.3 From 0b9954621a5f1219b4394c6c4e225d087edc1414 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 3 Aug 2011 12:08:51 +1000 Subject: Credit. --- doc/ScintillaHistory.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 5f2575fc4..57a476d80 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -380,6 +380,8 @@ Thomas Linder Puls Artyom Zuikov Gerrit + + Occam's Razor

-- cgit v1.2.3 From f13c4e804a0e2a832466d42fb3cf0a5852bf67f6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 3 Aug 2011 21:20:34 +1000 Subject: Patch from Kein-Hong Man: - bkend adjust - removal of isMatch() No changes to behaviour or highlighting, _except_ for CRLF line endings, highlighting will stop at the end of the HEREDOC delimiter instead of eating up the CR as well. --- lexers/LexPerl.cxx | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/lexers/LexPerl.cxx b/lexers/LexPerl.cxx index 7f0cbcf62..8a4456273 100644 --- a/lexers/LexPerl.cxx +++ b/lexers/LexPerl.cxx @@ -246,14 +246,6 @@ static bool styleCheckSubPrototype(LexAccessor &styler, unsigned int bk) { return true; } -static bool isMatch(const char *sref, char *s) { - // match per-line delimiter - must kill trailing CR if CRLF - int i = strlen(s); - if (i != 0 && s[i - 1] == '\r') - s[i - 1] = '\0'; - return (strcmp(sref, s) == 0); -} - static int actualNumStyle(int numberStyle) { if (numberStyle == PERLNUM_VECTOR || numberStyle == PERLNUM_V_VECTOR) { return SCE_PL_STRING; @@ -773,15 +765,16 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, case SCE_PL_HERE_QX: { // also implies HereDoc.State == 2 sc.Complete(); - while (!sc.atLineEnd) - sc.Forward(); - char s[HERE_DELIM_MAX]; - sc.GetCurrent(s, sizeof(s)); - if (isMatch(HereDoc.Delimiter, s)) { + if (HereDoc.DelimiterLength == 0 || sc.Match(HereDoc.Delimiter)) { + sc.Forward(HereDoc.DelimiterLength); + if (sc.atLineEnd || ((sc.ch == '\r' && sc.chNext == '\n'))) { sc.SetState(SCE_PL_DEFAULT); backFlag = BACK_NONE; HereDoc.State = 0; } + } + while (!sc.atLineEnd) + sc.Forward(); } break; case SCE_PL_POD: @@ -910,12 +903,13 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, break; case SCE_PL_FORMAT: { sc.Complete(); - while (!sc.atLineEnd) + if (sc.Match('.')) { sc.Forward(); - char s[10]; - sc.GetCurrent(s, sizeof(s)); - if (isMatch(".", s)) + if (sc.atLineEnd || ((sc.ch == '\r' && sc.chNext == '\n'))) sc.SetState(SCE_PL_DEFAULT); + } + while (!sc.atLineEnd) + sc.Forward(); } break; case SCE_PL_ERROR: @@ -1127,7 +1121,6 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, bool isHereDoc = sc.Match('<', '<'); bool hereDocSpace = false; // for: SCALAR [whitespace] '<<' unsigned int bk = (sc.currentPos > 0) ? sc.currentPos - 1: 0; - unsigned int bkend; sc.Complete(); styler.Flush(); if (styler.StyleAt(bk) == SCE_PL_DEFAULT) @@ -1196,7 +1189,7 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, // keywords always forced as /PATTERN/: split, if, elsif, while // everything else /PATTERN/ unless digit/space immediately after '/' // for '//', defined-or favoured unless special keywords - bkend = bk + 1; + unsigned int bkend = bk + 1; while (bk > 0 && styler.StyleAt(bk - 1) == SCE_PL_WORD) { bk--; } -- cgit v1.2.3 From c9c71dec593d8a8f52818ead276d91aeb4d191df Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 5 Aug 2011 08:49:58 +1000 Subject: Use casts to squash 64-bit warnings from strlen return value. --- lexers/LexAU3.cxx | 2 +- lexers/LexMagik.cxx | 2 +- lexers/LexModula.cxx | 4 ++-- lexers/LexPowerPro.cxx | 2 +- lexers/LexTeX.cxx | 2 +- lexers/LexVHDL.cxx | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lexers/LexAU3.cxx b/lexers/LexAU3.cxx index 72c918f07..e9ab75772 100644 --- a/lexers/LexAU3.cxx +++ b/lexers/LexAU3.cxx @@ -241,7 +241,7 @@ static void ColouriseAU3Doc(unsigned int startPos, if (IsAWordChar(sc.ch) || sc.ch == '}') { strcpy(s_save,s); - int tp = strlen(s_save); + int tp = static_cast(strlen(s_save)); if (tp < 99) { s_save[tp] = static_cast(tolower(sc.ch)); s_save[tp+1] = '\0'; diff --git a/lexers/LexMagik.cxx b/lexers/LexMagik.cxx index 45390d45d..992080dd8 100644 --- a/lexers/LexMagik.cxx +++ b/lexers/LexMagik.cxx @@ -233,7 +233,7 @@ static void ColouriseMagikDoc(unsigned int startPos, int length, int initStyle, } if(characters.InList(keyword)) { - sc.Forward(strlen(keyword)); + sc.Forward(static_cast(strlen(keyword))); } else { sc.Forward(); } diff --git a/lexers/LexModula.cxx b/lexers/LexModula.cxx index 1d0361165..cc5847fd6 100644 --- a/lexers/LexModula.cxx +++ b/lexers/LexModula.cxx @@ -92,7 +92,7 @@ static inline bool checkStatement( Accessor &styler, int &curPos, const char *stt, bool spaceAfter = true ) { - int len = strlen( stt ); + int len = static_cast(strlen( stt )); int i; for( i = 0; i < len; i++ ) { if( styler.SafeGetCharAt( curPos + i ) != stt[i] ) { @@ -113,7 +113,7 @@ static inline bool checkEndSemicolon( int &curPos, int endPos ) { const char *stt = "END"; - int len = strlen( stt ); + int len = static_cast(strlen( stt )); int i; for( i = 0; i < len; i++ ) { if( styler.SafeGetCharAt( curPos + i ) != stt[i] ) { diff --git a/lexers/LexPowerPro.cxx b/lexers/LexPowerPro.cxx index 89bce5800..e8a7a6689 100644 --- a/lexers/LexPowerPro.cxx +++ b/lexers/LexPowerPro.cxx @@ -155,7 +155,7 @@ static void ColourisePowerProDoc(unsigned int startPos, int length, int initStyl if ((sc.ch > 0) && setWord.Contains(sc.ch)) { strcpy(s_save,s); - int tp = strlen(s_save); + int tp = static_cast(strlen(s_save)); if (tp < 99) { s_save[tp] = static_cast(tolower(sc.ch)); s_save[tp+1] = '\0'; diff --git a/lexers/LexTeX.cxx b/lexers/LexTeX.cxx index 7b79670a9..062c7abb9 100644 --- a/lexers/LexTeX.cxx +++ b/lexers/LexTeX.cxx @@ -222,7 +222,7 @@ static void ColouriseTeXDoc( sc.ForwardSetState(SCE_TEX_TEXT) ; } else { sc.GetCurrent(key, sizeof(key)-1) ; - k = strlen(key) ; + k = static_cast(strlen(key)) ; memmove(key,key+1,k) ; // shift left over escape token key[k] = '\0' ; k-- ; diff --git a/lexers/LexVHDL.cxx b/lexers/LexVHDL.cxx index 58bcd1a5a..5580b3c5e 100644 --- a/lexers/LexVHDL.cxx +++ b/lexers/LexVHDL.cxx @@ -235,7 +235,7 @@ static void FoldNoBoxVHDLDoc( } } } - for(j=j+strlen(prevWord); j(strlen(prevWord)); j Date: Fri, 5 Aug 2011 08:56:36 +1000 Subject: Updated email contact. --- lexers/LexConf.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lexers/LexConf.cxx b/lexers/LexConf.cxx index 5e1bd199e..23ed5a6c8 100644 --- a/lexers/LexConf.cxx +++ b/lexers/LexConf.cxx @@ -2,7 +2,7 @@ /** @file LexConf.cxx ** Lexer for Apache Configuration Files. ** - ** First working version contributed by Ahmad Zawawi on October 28, 2000. + ** First working version contributed by Ahmad Zawawi on October 28, 2000. ** i created this lexer because i needed something pretty when dealing ** when Apache Configuration files... **/ -- cgit v1.2.3 From 2ecb1731ad9699b6bdccfdaad71136c771ff47cb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 5 Aug 2011 09:08:46 +1000 Subject: Added Wx::Scintilla and Padre. --- doc/ScintillaRelated.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/ScintillaRelated.html b/doc/ScintillaRelated.html index c4a89f9a0..7c6e6a486 100644 --- a/doc/ScintillaRelated.html +++ b/doc/ScintillaRelated.html @@ -28,6 +28,10 @@

Ports and Bindings of Scintilla

+

+ Wx::Scintilla + is a Perl Binding for Scintilla on wxWidgets. +

GtkScintilla is a GTK+ widget which enables easily adding a powerful @@ -114,6 +118,10 @@

Projects using Scintilla

+

+ Padre + is a wxWidgets-based Perl IDE. +

CoderStudio is an IDE for Assembly programming similar to Visual Studio 6.0. -- cgit v1.2.3 From 0f6df3f52a8b10105b209936151fe30f6c03628b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 5 Aug 2011 11:14:43 +1000 Subject: Lua lexer update for Lua 5.2 beta. Feature #3386330. (a) \* escapes in strings changed to \z (b) goto

-- cgit v1.2.3 From 89ad0c63a47d193cb81967ad7e98789655a36d68 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 7 Aug 2011 10:20:26 +1000 Subject: Do not extend decorations when appending to end of document. Bug #3378718. --- src/Decoration.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 90bde57f2..24632d7c1 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -126,9 +126,13 @@ bool DecorationList::FillRange(int &position, int value, int &fillLength) { } void DecorationList::InsertSpace(int position, int insertLength) { + const bool atEnd = position == lengthDocument; lengthDocument += insertLength; for (Decoration *deco=root; deco; deco = deco->next) { deco->rs.InsertSpace(position, insertLength); + if (atEnd) { + deco->rs.FillRange(position, 0, insertLength); + } } } -- cgit v1.2.3 From de9e15a24afa38c2107a515da7cc3bb9cc23498d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 8 Aug 2011 21:06:43 +1000 Subject: More selective for raw string mode. Bug #3388122. --- lexers/LexCPP.cxx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 22477c32f..51fd19255 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -803,15 +803,20 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, sc.SetState(SCE_C_REGEX|activitySet); // JavaScript's RegEx } else if (sc.ch == '\"') { if (sc.chPrev == 'R') { - sc.SetState(SCE_C_STRINGRAW|activitySet); - rawStringTerminator = ")"; - for (int termPos = sc.currentPos + 1;; termPos++) { - char chTerminator = styler.SafeGetCharAt(termPos, '('); - if (chTerminator == '(') - break; - rawStringTerminator += chTerminator; + styler.Flush(); + if (MaskActive(styler.StyleAt(sc.currentPos - 1)) == SCE_C_STRINGRAW) { + sc.SetState(SCE_C_STRINGRAW|activitySet); + rawStringTerminator = ")"; + for (int termPos = sc.currentPos + 1;; termPos++) { + char chTerminator = styler.SafeGetCharAt(termPos, '('); + if (chTerminator == '(') + break; + rawStringTerminator += chTerminator; + } + rawStringTerminator += '\"'; + } else { + sc.SetState(SCE_C_STRING|activitySet); } - rawStringTerminator += '\"'; } else { sc.SetState(SCE_C_STRING|activitySet); } -- cgit v1.2.3 From 5872020bc49119fe7153b3c1ece649133acad811 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 9 Aug 2011 11:06:41 +1000 Subject: Improvements to LaTeX lexer from Josepmaria Roca adds several new lexer states. Verbatim regions are handled. Bugs #1187857, #1493111, #1778404, #1856356, #2082547, #3081692 --- include/SciLexer.h | 8 ++ include/Scintilla.iface | 10 +- lexers/LexOthers.cxx | 250 ++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 239 insertions(+), 29 deletions(-) diff --git a/include/SciLexer.h b/include/SciLexer.h index c7d79aa2c..b265012cb 100644 --- a/include/SciLexer.h +++ b/include/SciLexer.h @@ -408,6 +408,14 @@ #define SCE_L_TAG 2 #define SCE_L_MATH 3 #define SCE_L_COMMENT 4 +#define SCE_L_TAG2 5 +#define SCE_L_MATH2 6 +#define SCE_L_COMMENT2 7 +#define SCE_L_VERBATIM 8 +#define SCE_L_SHORTCMD 9 +#define SCE_L_SPECIAL 10 +#define SCE_L_CMDOPT 11 +#define SCE_L_ERROR 12 #define SCE_LUA_DEFAULT 0 #define SCE_LUA_COMMENT 1 #define SCE_LUA_COMMENTLINE 2 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 92393cd66..7f637ef0b 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -2165,7 +2165,7 @@ set void RGBAImageSetHeight=2625(int height,) # It has the width and height from RGBAImageSetWidth/Height fun void MarkerDefineRGBAImage=2626(int markerNumber, string pixels) -# Register an RGBA image for use in autocompletion lists. +# Register an RGBA image for use in autocompletion lists. # It has the width and height from RGBAImageSetWidth/Height fun void RegisterRGBAImage=2627(int type, string pixels) @@ -2757,6 +2757,14 @@ val SCE_L_COMMAND=1 val SCE_L_TAG=2 val SCE_L_MATH=3 val SCE_L_COMMENT=4 +val SCE_L_TAG2=5 +val SCE_L_MATH2=6 +val SCE_L_COMMENT2=7 +val SCE_L_VERBATIM=8 +val SCE_L_SHORTCMD=9 +val SCE_L_SPECIAL=10 +val SCE_L_CMDOPT=11 +val SCE_L_ERROR=12 # Lexical states for SCLEX_LUA lex Lua=SCLEX_LUA SCE_LUA_ val SCE_LUA_DEFAULT=0 diff --git a/lexers/LexOthers.cxx b/lexers/LexOthers.cxx index bc2c28773..720d97930 100644 --- a/lexers/LexOthers.cxx +++ b/lexers/LexOthers.cxx @@ -1162,21 +1162,71 @@ static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordLi } } -static int isSpecial(char s) { - return (s == '\\') || (s == ',') || (s == ';') || (s == '\'') || (s == ' ') || - (s == '\"') || (s == '`') || (s == '^') || (s == '~'); +static bool latexIsSpecial(int ch) { + return (ch == '#') || (ch == '$') || (ch == '%') || (ch == '&') || (ch == '_') || + (ch == '{') || (ch == '}') || (ch == ' '); } -static int isTag(int start, Accessor &styler) { - char s[6]; - unsigned int i = 0, e = 1; - while (i < 5 && e) { - s[i] = styler[start + i]; +static bool latexIsBlank(int ch) { + return (ch == ' ') || (ch == '\t'); +} + +static bool latexIsBlankAndNL(int ch) { + return (ch == ' ') || (ch == '\t') || (ch == '\r') || (ch == '\n'); +} + +static bool latexIsLetter(int ch) { + return isascii(ch) && isalpha(ch); +} + +static bool latexIsTagValid(int &i, int l, Accessor &styler) { + while (i < l) { + if (styler.SafeGetCharAt(i) == '{') { + while (i < l) { + i++; + if (styler.SafeGetCharAt(i) == '}') { + return true; + } else if (!latexIsLetter(styler.SafeGetCharAt(i)) && + styler.SafeGetCharAt(i)!='*') { + return false; + } + } + } else if (!latexIsBlank(styler.SafeGetCharAt(i))) { + return false; + } i++; - e = (strchr("{ \t", styler[start + i]) == NULL); + } + return false; +} + +static bool latexNextNotBlankIs(int i, int l, Accessor &styler, char needle) { + char ch; + while (i < l) { + ch = styler.SafeGetCharAt(i); + if (!latexIsBlankAndNL(ch) && ch != '*') { + if (ch == needle) + return true; + else + return false; + } + i++; + } + return false; +} + +static bool latexLastWordIs(int start, Accessor &styler, const char *needle) { + unsigned int i = 0; + unsigned int l = static_cast(strlen(needle)); + int ini = start-l+1; + char s[32]; + + while (i < l && i < 32) { + s[i] = styler.SafeGetCharAt(ini + i); + i++; } s[i] = '\0'; - return (strcmp(s, "begin") == 0) || (strcmp(s, "end") == 0); + + return (strcmp(s, needle) == 0); } static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, @@ -1185,39 +1235,51 @@ static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, styler.StartAt(startPos); int state = initStyle; - char chNext = styler[startPos]; + char chNext = styler.SafeGetCharAt(startPos); styler.StartSegment(startPos); int lengthDoc = startPos + length; + char chVerbatimDelim = '\0'; for (int i = startPos; i < lengthDoc; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); if (styler.IsLeadByte(ch)) { - chNext = styler.SafeGetCharAt(i + 2); i++; + chNext = styler.SafeGetCharAt(i + 1); continue; } + switch (state) { case SCE_L_DEFAULT : switch (ch) { case '\\' : styler.ColourTo(i - 1, state); - if (isSpecial(styler[i + 1])) { - styler.ColourTo(i + 1, SCE_L_COMMAND); - i++; - chNext = styler.SafeGetCharAt(i + 1); + if (latexIsSpecial(chNext)) { + state = SCE_L_SPECIAL; } else { - if (isTag(i + 1, styler)) - state = SCE_L_TAG; - else + if (latexIsLetter(chNext)) { state = SCE_L_COMMAND; + } else { + if (chNext == '(' || chNext == '[') { + styler.ColourTo(i-1, state); + styler.ColourTo(i+1, SCE_L_SHORTCMD); + state = SCE_L_MATH; + if (chNext == '[') + state = SCE_L_MATH2; + i++; + chNext = styler.SafeGetCharAt(i+1); + } else { + state = SCE_L_SHORTCMD; + } + } } break; case '$' : styler.ColourTo(i - 1, state); state = SCE_L_MATH; if (chNext == '$') { + state = SCE_L_MATH2; i++; chNext = styler.SafeGetCharAt(i + 1); } @@ -1228,29 +1290,124 @@ static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, break; } break; + case SCE_L_ERROR: + styler.ColourTo(i-1, state); + state = SCE_L_DEFAULT; + break; + case SCE_L_SPECIAL: + case SCE_L_SHORTCMD: + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + break; case SCE_L_COMMAND : - if (chNext == '[' || chNext == '{' || chNext == '}' || - chNext == ' ' || chNext == '\r' || chNext == '\n') { + if (!latexIsLetter(chNext)) { styler.ColourTo(i, state); state = SCE_L_DEFAULT; - i++; - chNext = styler.SafeGetCharAt(i + 1); + if (latexNextNotBlankIs(i+1, lengthDoc, styler, '[' )) { + state = SCE_L_CMDOPT; + } else if (latexLastWordIs(i, styler, "\\begin")) { + state = SCE_L_TAG; + } else if (latexLastWordIs(i, styler, "\\end")) { + state = SCE_L_TAG2; + } else if (latexLastWordIs(i, styler, "\\verb") && + chNext != '*' && chNext != ' ') { + chVerbatimDelim = chNext; + state = SCE_L_VERBATIM; + } } break; + case SCE_L_CMDOPT : + if (ch == ']') { + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + } + break; case SCE_L_TAG : - if (ch == '}') { + if (latexIsTagValid(i, lengthDoc, styler)) { + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + if (latexLastWordIs(i, styler, "{verbatim}")) { + state = SCE_L_VERBATIM; + } else if (latexLastWordIs(i, styler, "{comment}")) { + state = SCE_L_COMMENT2; + } else if (latexLastWordIs(i, styler, "{math}")) { + state = SCE_L_MATH; + } else if (latexLastWordIs(i, styler, "{displaymath}")) { + state = SCE_L_MATH2; + } else if (latexLastWordIs(i, styler, "{equation}")) { + state = SCE_L_MATH2; + } + } else { + state = SCE_L_ERROR; styler.ColourTo(i, state); state = SCE_L_DEFAULT; } + chNext = styler.SafeGetCharAt(i+1); + break; + case SCE_L_TAG2 : + if (latexIsTagValid(i, lengthDoc, styler)) { + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + } else { + state = SCE_L_ERROR; + } + chNext = styler.SafeGetCharAt(i+1); break; case SCE_L_MATH : if (ch == '$') { - if (chNext == '$') { - i++; - chNext = styler.SafeGetCharAt(i + 1); - } styler.ColourTo(i, state); state = SCE_L_DEFAULT; + } else if (ch == '\\' && chNext == ')') { + styler.ColourTo(i-1, state); + styler.ColourTo(i+1, SCE_L_SHORTCMD); + i++; + chNext = styler.SafeGetCharAt(i+1); + state = SCE_L_DEFAULT; + } else if (ch == '\\') { + int match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIs(match, styler, "{math}")) { + styler.ColourTo(i-1, state); + state = SCE_L_COMMAND; + } + } + } + } + + break; + case SCE_L_MATH2 : + if (ch == '$') { + if (chNext == '$') { + i++; + chNext = styler.SafeGetCharAt(i + 1); + styler.ColourTo(i, state); + state = SCE_L_DEFAULT; + } else { + styler.ColourTo(i, SCE_L_ERROR); + state = SCE_L_DEFAULT; + } + } else if (ch == '\\' && chNext == ']') { + styler.ColourTo(i-1, state); + styler.ColourTo(i+1, SCE_L_SHORTCMD); + i++; + chNext = styler.SafeGetCharAt(i+1); + state = SCE_L_DEFAULT; + } else if (ch == '\\') { + int match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIs(match, styler, "{displaymath}")) { + styler.ColourTo(i-1, state); + state = SCE_L_COMMAND; + } else if (latexLastWordIs(match, styler, "{equation}")) { + styler.ColourTo(i-1, state); + state = SCE_L_COMMAND; + } + } + } } break; case SCE_L_COMMENT : @@ -1258,6 +1415,43 @@ static void ColouriseLatexDoc(unsigned int startPos, int length, int initStyle, styler.ColourTo(i - 1, state); state = SCE_L_DEFAULT; } + break; + case SCE_L_COMMENT2 : + if (ch == '\\') { + int match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIs(match, styler, "{comment}")) { + styler.ColourTo(i-1, state); + state = SCE_L_COMMAND; + } + } + } + } + break; + case SCE_L_VERBATIM : + if (ch == '\\') { + int match = i + 3; + if (latexLastWordIs(match, styler, "\\end")) { + match++; + if (latexIsTagValid(match, lengthDoc, styler)) { + if (latexLastWordIs(match, styler, "{verbatim}")) { + styler.ColourTo(i-1, state); + state = SCE_L_COMMAND; + } + } + } + } else if (chNext == chVerbatimDelim) { + styler.ColourTo(i+1, state); + state = SCE_L_DEFAULT; + chVerbatimDelim = '\0'; + } else if (chVerbatimDelim != '\0' && (ch == '\n' || ch == '\r')) { + styler.ColourTo(i, SCE_L_ERROR); + state = SCE_L_DEFAULT; + chVerbatimDelim = '\0'; + } + break; } } styler.ColourTo(lengthDoc-1, state); -- cgit v1.2.3 From 7d81161370e2e4895d1f29ce1d2c207e97a7020b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 10 Aug 2011 12:46:29 +1000 Subject: Feature #3388802. Support changes in Perl 5.14.0: (a) new + character for subroutine prototypes (b) 0X and 0B prefixes for binary and hexadecimal numbers are now legal From Kein-Hong Man --- lexers/LexPerl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lexers/LexPerl.cxx b/lexers/LexPerl.cxx index 8a4456273..5efc1d636 100644 --- a/lexers/LexPerl.cxx +++ b/lexers/LexPerl.cxx @@ -442,7 +442,7 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, CharacterSet &setPOD = setModifiers; CharacterSet setNonHereDoc(CharacterSet::setDigits, "=$@"); CharacterSet setHereDocDelim(CharacterSet::setAlphaNum, "_"); - CharacterSet setSubPrototype(CharacterSet::setNone, "\\[$@%&*];"); + CharacterSet setSubPrototype(CharacterSet::setNone, "\\[$@%&*+];"); // for format identifiers CharacterSet setFormatStart(CharacterSet::setAlpha, "_="); CharacterSet &setFormat = setHereDocDelim; @@ -994,9 +994,9 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, numState = PERLNUM_DECIMAL; dotCount = 0; if (sc.ch == '0') { // hex,bin,octal - if (sc.chNext == 'x') { + if (sc.chNext == 'x' || sc.chNext == 'X') { numState = PERLNUM_HEX; - } else if (sc.chNext == 'b') { + } else if (sc.chNext == 'b' || sc.chNext == 'B') { numState = PERLNUM_BINARY; } else if (IsADigit(sc.chNext)) { numState = PERLNUM_OCTAL; -- cgit v1.2.3 From 706b3f5a9b8c7192983d20ff726f040cc0fa8966 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 10 Aug 2011 19:53:34 +1000 Subject: Fix for wrong cursor near selection ends when scrolled horizontally. Bug #3389055. --- src/Editor.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Editor.cxx b/src/Editor.cxx index 452666be7..f6b1ea308 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6020,20 +6020,20 @@ bool Editor::PositionInSelection(int pos) { bool Editor::PointInSelection(Point pt) { SelectionPosition pos = SPositionFromLocation(pt, false, true); - int xPos = XFromPosition(pos); + Point ptPos = LocationFromPosition(pos); for (size_t r=0; r xPos) { + if (pt.x > ptPos.x) { hit = false; } } -- cgit v1.2.3 From fafcffad2b74f045990f025fba5ce25d7db91812 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 20 Aug 2011 09:51:57 +1000 Subject: Include autocompletion list test. --- cocoa/ScintillaTest/AppController.mm | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/cocoa/ScintillaTest/AppController.mm b/cocoa/ScintillaTest/AppController.mm index 4c8801a33..24941ffe2 100644 --- a/cocoa/ScintillaTest/AppController.mm +++ b/cocoa/ScintillaTest/AppController.mm @@ -211,6 +211,47 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL. //-------------------------------------------------------------------------------------------------- +/* XPM */ +static const char * box_xpm[] = { + "12 12 2 1", + " c None", + ". c #800000", + " .........", + " . . ..", + " . . . .", + "......... .", + ". . . .", + ". . . ..", + ". . .. .", + "......... .", + ". . . .", + ". . . . ", + ". . .. ", + "......... "}; + + +- (void) showAutocompletion +{ + const char *words = "Babylon-5?1 Battlestar-Galactica Millenium-Falcon?2 Moya?2 Serenity Voyager"; + [mEditor setGeneralProperty: SCI_AUTOCSETIGNORECASE parameter: 1 value:0]; + [mEditor setGeneralProperty: SCI_REGISTERIMAGE parameter: 1 value:(sptr_t)box_xpm]; + const int imSize = 12; + [mEditor setGeneralProperty: SCI_RGBAIMAGESETWIDTH parameter: imSize value:0]; + [mEditor setGeneralProperty: SCI_RGBAIMAGESETHEIGHT parameter: imSize value:0]; + char image[imSize * imSize * 4]; + for (size_t y = 0; y < imSize; y++) { + for (size_t x = 0; x < imSize; x++) { + char *p = image + (y * imSize + x) * 4; + p[0] = 0xFF; + p[1] = 0xA0; + p[2] = 0; + p[3] = x * 23; + } + } + [mEditor setGeneralProperty: SCI_REGISTERRGBAIMAGE parameter: 2 value:(sptr_t)image]; + [mEditor setGeneralProperty: SCI_AUTOCSHOW parameter: 0 value:(sptr_t)words]; +} + - (IBAction) searchText: (id) sender { NSSearchField* searchField = (NSSearchField*) sender; @@ -219,6 +260,8 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL. wholeWord: NO scrollTo: YES wrap: YES]; + if ([[searchField stringValue] isEqualToString: @"XX"]) + [self showAutocompletion]; } @end -- cgit v1.2.3 From 502fe6953ebc27dde3622ea9fa8313364c412217 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 20 Aug 2011 10:00:50 +1000 Subject: Replace call available only on 10.6 with sequence that works on 10.5. --- cocoa/PlatCocoa.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 75803e33b..e2e2915f5 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1378,7 +1378,10 @@ static NSImage* ImageFromXPM(XPM* pxpm) img = [NSImage alloc]; [img autorelease]; CGImageRef imageRef = surfaceIXPM->GetImage(); - [img initWithCGImage:imageRef size:NSZeroSize]; + [img initWithSize:NSZeroSize]; + NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; + [img addRepresentation: bitmapRep]; + [bitmapRep release]; CGImageRelease(imageRef); delete surfaceXPM; } @@ -1836,7 +1839,10 @@ void ListBoxImpl::RegisterRGBAImage(int type, int width, int height, const unsig [img autorelease]; CGImageRef imageRef = ImageFromRGBA(width, height, pixelsImage, false); NSSize sz = {width, height}; - [img initWithCGImage:imageRef size:sz]; + [img initWithSize: sz]; + NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage: imageRef]; + [img addRepresentation: bitmapRep]; + [bitmapRep release]; CGImageRelease(imageRef); [img retain]; ImageMap::iterator it=images.find(type); -- cgit v1.2.3 From 29eb86f8dc7d6b95c364135443bf71e0c77dfc6a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 20 Aug 2011 10:21:43 +1000 Subject: Specify that AutoCompletionDataSource implements NSTableViewDataSource protocol only when building for later than 10.5 so SDK has to know about that protocol. --- cocoa/PlatCocoa.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index e2e2915f5..22eadec0f 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1462,7 +1462,10 @@ public: class ListBoxImpl; @interface AutoCompletionDataSource : -NSObject +NSObject +#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 + +#endif { ListBoxImpl* box; } -- cgit v1.2.3 From 4d5260e36e1353b0d317e4538ca252fa430e14c2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 20 Aug 2011 10:24:06 +1000 Subject: Fix memory leak with images in autocompletion list. --- cocoa/PlatCocoa.mm | 1 - 1 file changed, 1 deletion(-) diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 22eadec0f..fd66f671f 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1882,7 +1882,6 @@ NSImage* ListBoxImpl::ImageForRow(NSInteger row) if (it != images.end()) { NSImage* img = it->second; - [img retain]; return img; } else -- cgit v1.2.3 From 88f9a63f05e08fed53c767cad7a72bb6d2f95e88 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 20 Aug 2011 20:11:21 +1000 Subject: Styling of variable interpolation for Perl. Feature #3394258. From Kein-Hong Man. --- include/SciLexer.h | 10 ++ include/Scintilla.iface | 10 ++ lexers/LexPerl.cxx | 342 +++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 302 insertions(+), 60 deletions(-) diff --git a/include/SciLexer.h b/include/SciLexer.h index b265012cb..e8805f2d6 100644 --- a/include/SciLexer.h +++ b/include/SciLexer.h @@ -344,6 +344,16 @@ #define SCE_PL_SUB_PROTOTYPE 40 #define SCE_PL_FORMAT_IDENT 41 #define SCE_PL_FORMAT 42 +#define SCE_PL_STRING_VAR 43 +#define SCE_PL_XLAT 44 +#define SCE_PL_REGEX_VAR 54 +#define SCE_PL_REGSUBST_VAR 55 +#define SCE_PL_BACKTICKS_VAR 57 +#define SCE_PL_HERE_QQ_VAR 61 +#define SCE_PL_HERE_QX_VAR 62 +#define SCE_PL_STRING_QQ_VAR 64 +#define SCE_PL_STRING_QX_VAR 65 +#define SCE_PL_STRING_QR_VAR 66 #define SCE_RB_DEFAULT 0 #define SCE_RB_ERROR 1 #define SCE_RB_COMMENTLINE 2 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 7f637ef0b..9530f4292 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -2683,6 +2683,16 @@ val SCE_PL_POD_VERB=31 val SCE_PL_SUB_PROTOTYPE=40 val SCE_PL_FORMAT_IDENT=41 val SCE_PL_FORMAT=42 +val SCE_PL_STRING_VAR=43 +val SCE_PL_XLAT=44 +val SCE_PL_REGEX_VAR=54 +val SCE_PL_REGSUBST_VAR=55 +val SCE_PL_BACKTICKS_VAR=57 +val SCE_PL_HERE_QQ_VAR=61 +val SCE_PL_HERE_QX_VAR=62 +val SCE_PL_STRING_QQ_VAR=64 +val SCE_PL_STRING_QX_VAR=65 +val SCE_PL_STRING_QR_VAR=66 # Lexical states for SCLEX_RUBY lex Ruby=SCLEX_RUBY SCE_RB_ val SCE_RB_DEFAULT=0 diff --git a/lexers/LexPerl.cxx b/lexers/LexPerl.cxx index 5efc1d636..8a0f6422e 100644 --- a/lexers/LexPerl.cxx +++ b/lexers/LexPerl.cxx @@ -69,6 +69,10 @@ using namespace Scintilla; #define BACK_OPERATOR 1 // whitespace/comments are insignificant #define BACK_KEYWORD 2 // operators/keywords are needed for disambiguation +// all interpolated styles are different from their parent styles by a constant difference +// we also assume SCE_PL_STRING_VAR is the interpolated style with the smallest value +#define INTERPOLATE_SHIFT (SCE_PL_STRING_VAR - SCE_PL_STRING) + static bool isPerlKeyword(unsigned int start, unsigned int end, WordList &keywords, LexAccessor &styler) { // old-style keyword matcher; needed because GetCurrent() needs // current segment to be committed, but we may abandon early... @@ -352,11 +356,19 @@ struct OptionSetPerl : public OptionSet { }; class LexerPerl : public ILexer { + CharacterSet setWordStart; + CharacterSet setWord; + CharacterSet setSpecialVar; + CharacterSet setControlVar; WordList keywords; OptionsPerl options; OptionSetPerl osPerl; public: - LexerPerl() { + LexerPerl() : + setWordStart(CharacterSet::setAlpha, "_", 0x80, true), + setWord(CharacterSet::setAlphaNum, "_", 0x80, true), + setSpecialVar(CharacterSet::setNone, "\"$;<>&`'+,./\\%:=~!?@[]"), + setControlVar(CharacterSet::setNone, "ACDEFHILMNOPRSTVWX") { } ~LexerPerl() { } @@ -390,6 +402,7 @@ public: static ILexer *LexerFactoryPerl() { return new LexerPerl(); } + void InterpolateSegment(StyleContext &sc, int maxSeg, bool isPattern=false); }; int SCI_METHOD LexerPerl::PropertySet(const char *key, const char *val) { @@ -418,6 +431,90 @@ int SCI_METHOD LexerPerl::WordListSet(int n, const char *wl) { return firstModification; } +void LexerPerl::InterpolateSegment(StyleContext &sc, int maxSeg, bool isPattern) { + // interpolate a segment (with no active backslashes or delimiters within) + // switch in or out of an interpolation style or continue current style + // commit variable patterns if found, trim segment, repeat until done + while (maxSeg > 0) { + bool isVar = false; + int sLen = 0; + if ((maxSeg > 1) && (sc.ch == '$' || sc.ch == '@')) { + // $#[$]*word [$@][$]*word (where word or {word} is always present) + bool braces = false; + sLen = 1; + if (sc.ch == '$' && sc.chNext == '#') { // starts with $# + sLen++; + } + while ((maxSeg > sLen) && (sc.GetRelative(sLen) == '$')) // >0 $ dereference within + sLen++; + if ((maxSeg > sLen) && (sc.GetRelative(sLen) == '{')) { // { start for {word} + sLen++; + braces = true; + } + if (maxSeg > sLen) { + int c = sc.GetRelative(sLen); + if (setWordStart.Contains(c)) { // word (various) + sLen++; + isVar = true; + while ((maxSeg > sLen) && setWord.Contains(sc.GetRelative(sLen))) + sLen++; + } else if (braces && IsADigit(c) && (sLen == 2)) { // digit for ${digit} + sLen++; + isVar = true; + } + } + if (braces) { + if ((maxSeg > sLen) && (sc.GetRelative(sLen) == '}')) { // } end for {word} + sLen++; + } else + isVar = false; + } + } + if (!isVar && (maxSeg > 1)) { // $- or @-specific variable patterns + sLen = 1; + int c = sc.chNext; + if (sc.ch == '$') { + if (IsADigit(c)) { // $[0-9] and slurp trailing digits + sLen++; + isVar = true; + while ((maxSeg > sLen) && IsADigit(sc.GetRelative(sLen))) + sLen++; + } else if (setSpecialVar.Contains(c)) { // $ special variables + sLen++; + isVar = true; + } else if (!isPattern && ((c == '(') || (c == ')') || (c == '|'))) { // $ additional + sLen++; + isVar = true; + } else if (c == '^') { // $^A control-char style + sLen++; + if ((maxSeg > sLen) && setControlVar.Contains(sc.GetRelative(sLen))) { + sLen++; + isVar = true; + } + } + } else if (sc.ch == '@') { + if (!isPattern && ((c == '+') || (c == '-'))) { // @ specials non-pattern + sLen++; + isVar = true; + } + } + } + if (isVar) { // commit as interpolated variable or normal character + if (sc.state < SCE_PL_STRING_VAR) + sc.SetState(sc.state + INTERPOLATE_SHIFT); + sc.Forward(sLen); + maxSeg -= sLen; + } else { + if (sc.state >= SCE_PL_STRING_VAR) + sc.SetState(sc.state - INTERPOLATE_SHIFT); + sc.Forward(); + maxSeg--; + } + } + if (sc.state >= SCE_PL_STRING_VAR) + sc.SetState(sc.state - INTERPOLATE_SHIFT); +} + void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, IDocument *pAccess) { LexAccessor styler(pAccess); @@ -426,8 +523,6 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, reWords.Set("elsif if split while"); // charset classes - CharacterSet setWordStart(CharacterSet::setAlpha, "_", 0x80, true); - CharacterSet setWord(CharacterSet::setAlphaNum, "_", 0x80, true); CharacterSet setSingleCharOp(CharacterSet::setNone, "rwxoRWXOezsfdlpSbctugkTBMAC"); // lexing of "%*,?!.~"); @@ -512,10 +607,13 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, // Includes strings (may be multi-line), numbers (additional state), format // bodies, as well as POD sections. if (initStyle == SCE_PL_HERE_Q - || initStyle == SCE_PL_HERE_QQ - || initStyle == SCE_PL_HERE_QX - || initStyle == SCE_PL_FORMAT + || initStyle == SCE_PL_HERE_QQ + || initStyle == SCE_PL_HERE_QX + || initStyle == SCE_PL_FORMAT + || initStyle == SCE_PL_HERE_QQ_VAR + || initStyle == SCE_PL_HERE_QX_VAR ) { + // backtrack through multiple styles to reach the delimiter start int delim = (initStyle == SCE_PL_FORMAT) ? SCE_PL_FORMAT_IDENT:SCE_PL_HERE_DELIM; while ((startPos > 1) && (styler.StyleAt(startPos) != delim)) { startPos--; @@ -523,15 +621,34 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, startPos = styler.LineStart(styler.GetLine(startPos)); initStyle = styler.StyleAt(startPos - 1); } - if (initStyle == SCE_PL_STRING_Q - || initStyle == SCE_PL_STRING_QQ - || initStyle == SCE_PL_STRING_QX - || initStyle == SCE_PL_STRING_QR + if (initStyle == SCE_PL_STRING + || initStyle == SCE_PL_STRING_QQ + || initStyle == SCE_PL_BACKTICKS + || initStyle == SCE_PL_STRING_QX + || initStyle == SCE_PL_REGEX + || initStyle == SCE_PL_STRING_QR + || initStyle == SCE_PL_REGSUBST + || initStyle == SCE_PL_STRING_VAR + || initStyle == SCE_PL_STRING_QQ_VAR + || initStyle == SCE_PL_BACKTICKS_VAR + || initStyle == SCE_PL_STRING_QX_VAR + || initStyle == SCE_PL_REGEX_VAR + || initStyle == SCE_PL_STRING_QR_VAR + || initStyle == SCE_PL_REGSUBST_VAR + ) { + // for interpolation, must backtrack through a mix of two different styles + int otherStyle = (initStyle >= SCE_PL_STRING_VAR) ? + initStyle - INTERPOLATE_SHIFT : initStyle + INTERPOLATE_SHIFT; + while (startPos > 1) { + int st = styler.StyleAt(startPos - 1); + if ((st != initStyle) && (st != otherStyle)) + break; + startPos--; + } + initStyle = SCE_PL_DEFAULT; + } else if (initStyle == SCE_PL_STRING_Q || initStyle == SCE_PL_STRING_QW - || initStyle == SCE_PL_REGEX - || initStyle == SCE_PL_REGSUBST - || initStyle == SCE_PL_STRING - || initStyle == SCE_PL_BACKTICKS + || initStyle == SCE_PL_XLAT || initStyle == SCE_PL_CHARACTER || initStyle == SCE_PL_NUMBER || initStyle == SCE_PL_IDENTIFIER @@ -762,19 +879,49 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, break; case SCE_PL_HERE_Q: case SCE_PL_HERE_QQ: - case SCE_PL_HERE_QX: { - // also implies HereDoc.State == 2 - sc.Complete(); - if (HereDoc.DelimiterLength == 0 || sc.Match(HereDoc.Delimiter)) { + case SCE_PL_HERE_QX: + // also implies HereDoc.State == 2 + sc.Complete(); + if (HereDoc.DelimiterLength == 0 || sc.Match(HereDoc.Delimiter)) { + int c = sc.GetRelative(HereDoc.DelimiterLength); + if (c == '\r' || c == '\n') { // peek first, do not consume match sc.Forward(HereDoc.DelimiterLength); - if (sc.atLineEnd || ((sc.ch == '\r' && sc.chNext == '\n'))) { sc.SetState(SCE_PL_DEFAULT); backFlag = BACK_NONE; HereDoc.State = 0; + if (!sc.atLineEnd) + sc.Forward(); + break; } } + if (sc.state == SCE_PL_HERE_Q) { // \EOF and 'EOF' non-interpolated while (!sc.atLineEnd) sc.Forward(); + break; + } + while (!sc.atLineEnd) { // "EOF" and `EOF` interpolated + int s = 0, endType = 0; + int maxSeg = endPos - sc.currentPos; + while (s < maxSeg) { // scan to break string into segments + int c = sc.GetRelative(s); + if (c == '\\') { + endType = 1; break; + } else if (c == '\r' || c == '\n') { + endType = 2; break; + } + s++; + } + if (s > 0) // process non-empty segments + InterpolateSegment(sc, s); + if (endType == 1) { + sc.Forward(); + // \ at end-of-line does not appear to have any effect, skip + if (sc.ch != '\r' && sc.ch != '\n') + sc.Forward(); + } else if (endType == 2) { + if (!sc.atLineEnd) + sc.Forward(); + } } break; case SCE_PL_POD: @@ -826,45 +973,89 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, sc.SetState(SCE_PL_DEFAULT); } else if (!Quote.Up && !IsASpace(sc.ch)) { Quote.Open(sc.ch); - } else if (sc.ch == '\\' && Quote.Up != '\\') { - sc.Forward(); - } else if (sc.ch == Quote.Down) { - Quote.Count--; - if (Quote.Count == 0) - Quote.Rep--; - } else if (sc.ch == Quote.Up) { - Quote.Count++; + } else { + int s = 0, endType = 0; + int maxSeg = endPos - sc.currentPos; + while (s < maxSeg) { // scan to break string into segments + int c = sc.GetRelative(s); + if (IsASpace(c)) { + break; + } else if (c == '\\' && Quote.Up != '\\') { + endType = 1; break; + } else if (c == Quote.Down) { + Quote.Count--; + if (Quote.Count == 0) { + Quote.Rep--; + break; + } + } else if (c == Quote.Up) + Quote.Count++; + s++; + } + if (s > 0) { // process non-empty segments + if (Quote.Up != '\'') { + InterpolateSegment(sc, s, true); + } else // non-interpolated path + sc.Forward(s); + } + if (endType == 1) + sc.Forward(); } break; case SCE_PL_REGSUBST: + case SCE_PL_XLAT: if (Quote.Rep <= 0) { if (!setModifiers.Contains(sc.ch)) sc.SetState(SCE_PL_DEFAULT); } else if (!Quote.Up && !IsASpace(sc.ch)) { Quote.Open(sc.ch); - } else if (sc.ch == '\\' && Quote.Up != '\\') { - sc.Forward(); - } else if (Quote.Count == 0 && Quote.Rep == 1) { - // We matched something like s(...) or tr{...}, Perl 5.10 - // appears to allow almost any character for use as the - // next delimiters. Whitespace and comments are accepted in - // between, but we'll limit to whitespace here. - // For '#', if no whitespace in between, it's a delimiter. - if (IsASpace(sc.ch)) { - // Keep going - } else if (sc.ch == '#' && IsASpaceOrTab(sc.chPrev)) { - sc.SetState(SCE_PL_DEFAULT); - } else { - Quote.Open(sc.ch); + } else { + int s = 0, endType = 0; + int maxSeg = endPos - sc.currentPos; + bool isPattern = (Quote.Rep == 2); + while (s < maxSeg) { // scan to break string into segments + int c = sc.GetRelative(s); + if (c == '\\' && Quote.Up != '\\') { + endType = 2; break; + } else if (Quote.Count == 0 && Quote.Rep == 1) { + // We matched something like s(...) or tr{...}, Perl 5.10 + // appears to allow almost any character for use as the + // next delimiters. Whitespace and comments are accepted in + // between, but we'll limit to whitespace here. + // For '#', if no whitespace in between, it's a delimiter. + if (IsASpace(c)) { + // Keep going + } else if (c == '#' && IsASpaceOrTab(sc.GetRelative(s - 1))) { + endType = 3; + } else + Quote.Open(c); + break; + } else if (c == Quote.Down) { + Quote.Count--; + if (Quote.Count == 0) { + Quote.Rep--; + endType = 1; + } + if (Quote.Up == Quote.Down) + Quote.Count++; + if (endType == 1) + break; + } else if (c == Quote.Up) { + Quote.Count++; + } else if (IsASpace(c)) + break; + s++; } - } else if (sc.ch == Quote.Down) { - Quote.Count--; - if (Quote.Count == 0) - Quote.Rep--; - if (Quote.Up == Quote.Down) - Quote.Count++; - } else if (sc.ch == Quote.Up) { - Quote.Count++; + if (s > 0) { // process non-empty segments + if (sc.state == SCE_PL_REGSUBST && Quote.Up != '\'') { + InterpolateSegment(sc, s, isPattern); + } else // non-interpolated path + sc.Forward(s); + } + if (endType == 2) { + sc.Forward(); + } else if (endType == 3) + sc.SetState(SCE_PL_DEFAULT); } break; case SCE_PL_STRING_Q: @@ -876,14 +1067,45 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, case SCE_PL_BACKTICKS: if (!Quote.Down && !IsASpace(sc.ch)) { Quote.Open(sc.ch); - } else if (sc.ch == '\\' && Quote.Up != '\\') { - sc.Forward(); - } else if (sc.ch == Quote.Down) { - Quote.Count--; - if (Quote.Count == 0) + } else { + int s = 0, endType = 0; + int maxSeg = endPos - sc.currentPos; + while (s < maxSeg) { // scan to break string into segments + int c = sc.GetRelative(s); + if (IsASpace(c)) { + break; + } else if (c == '\\' && Quote.Up != '\\') { + endType = 2; break; + } else if (c == Quote.Down) { + Quote.Count--; + if (Quote.Count == 0) { + endType = 3; break; + } + } else if (c == Quote.Up) + Quote.Count++; + s++; + } + if (s > 0) { // process non-empty segments + switch (sc.state) { + case SCE_PL_STRING: + case SCE_PL_STRING_QQ: + case SCE_PL_BACKTICKS: + InterpolateSegment(sc, s); + break; + case SCE_PL_STRING_QX: + if (Quote.Up != '\'') { + InterpolateSegment(sc, s); + break; + } + // (continued for ' delim) + default: // non-interpolated path + sc.Forward(s); + } + } + if (endType == 2) { + sc.Forward(); + } else if (endType == 3) sc.ForwardSetState(SCE_PL_DEFAULT); - } else if (sc.ch == Quote.Up) { - Quote.Count++; } break; case SCE_PL_SUB_PROTOTYPE: { @@ -906,8 +1128,8 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, if (sc.Match('.')) { sc.Forward(); if (sc.atLineEnd || ((sc.ch == '\r' && sc.chNext == '\n'))) - sc.SetState(SCE_PL_DEFAULT); - } + sc.SetState(SCE_PL_DEFAULT); + } while (!sc.atLineEnd) sc.Forward(); } @@ -1026,10 +1248,10 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle, sc.ChangeState(SCE_PL_STRING_Q); Quote.New(); } else if (sc.ch == 'y' && !setWord.Contains(sc.chNext)) { - sc.ChangeState(SCE_PL_REGSUBST); + sc.ChangeState(SCE_PL_XLAT); Quote.New(2); } else if (sc.Match('t', 'r') && !setWord.Contains(sc.GetRelative(2))) { - sc.ChangeState(SCE_PL_REGSUBST); + sc.ChangeState(SCE_PL_XLAT); Quote.New(2); sc.Forward(); fw++; -- cgit v1.2.3 From d0443a3bd7c34e204b4e918a4184f0fb18f6cd79 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 26 Aug 2011 08:57:10 +1000 Subject: Fixing Markdown lexer to not change state inside term. Bug #3398184. From Eric Promislow at ActiveState. --- lexers/LexMarkdown.cxx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lexers/LexMarkdown.cxx b/lexers/LexMarkdown.cxx index 393712033..a92697707 100644 --- a/lexers/LexMarkdown.cxx +++ b/lexers/LexMarkdown.cxx @@ -113,6 +113,10 @@ static bool HasPrevLineContent(StyleContext &sc) { return false; } +static bool AtTermStart(StyleContext &sc) { + return sc.currentPos == 0 || isspacechar(sc.chPrev); +} + static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { int c, count = 1; unsigned int i = 0; @@ -373,35 +377,38 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle } } // Code - also a special case for alternate inside spacing - if (sc.Match("``") && sc.GetRelative(3) != ' ') { + if (sc.Match("``") && sc.GetRelative(3) != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_CODE2); sc.Forward(); } - else if (sc.ch == '`' && sc.chNext != ' ') { + else if (sc.ch == '`' && sc.chNext != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_CODE); } // Strong - else if (sc.Match("**") && sc.GetRelative(2) != ' ') { + else if (sc.Match("**") && sc.GetRelative(2) != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_STRONG1); sc.Forward(); } - else if (sc.Match("__") && sc.GetRelative(2) != ' ') { + else if (sc.Match("__") && sc.GetRelative(2) != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_STRONG2); sc.Forward(); } // Emphasis - else if (sc.ch == '*' && sc.chNext != ' ') + else if (sc.ch == '*' && sc.chNext != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_EM1); - else if (sc.ch == '_' && sc.chNext != ' ') + } + else if (sc.ch == '_' && sc.chNext != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_EM2); + } // Strikeout - else if (sc.Match("~~") && sc.GetRelative(2) != ' ') { + else if (sc.Match("~~") && sc.GetRelative(2) != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_STRIKEOUT); sc.Forward(); } // Beginning of line - else if (IsNewline(sc.ch)) + else if (IsNewline(sc.ch)) { sc.SetState(SCE_MARKDOWN_LINE_BEGIN); + } } // Advance if not holding back the cursor for this iteration. if (!freezeCursor) -- cgit v1.2.3 From f90956e86fd0cf150b241838f1b03870e043d9cb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 27 Aug 2011 10:42:47 +1000 Subject: Basing default eol mode on _WIN32 instead of __unix__ as OS X does not define __unix__. --- src/Document.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Document.cxx b/src/Document.cxx index 2729d3d7b..5c05aa5e0 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -87,10 +87,10 @@ void LexInterface::Colourise(int start, int end) { Document::Document() { refCount = 0; -#ifdef __unix__ - eolMode = SC_EOL_LF; -#else +#ifdef _WIN32 eolMode = SC_EOL_CRLF; +#else + eolMode = SC_EOL_LF; #endif dbcsCodePage = 0; stylingBits = 5; -- cgit v1.2.3 From bee370d047b32376fbf718c7dd0f3ef8f35b5036 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 2 Sep 2011 14:59:21 +1000 Subject: Removed archaic unused deallocation calls. --- gtk/PlatGTK.cxx | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index b8ee6b385..39dba1d71 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1592,7 +1592,6 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char int xText = rc.left; if (PFont(font_)->pfd) { char *utfForm = 0; - bool useGFree = false; if (et == UTF8) { pango_layout_set_text(layout, s, len); } else { @@ -1626,11 +1625,7 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char #else gdk_draw_layout_line(drawable, gc, xText, ybase, pll); #endif - if (useGFree) { - g_free(utfForm); - } else { - delete []utfForm; - } + delete []utfForm; return; } #ifndef DISABLE_GDK_FONT @@ -1808,7 +1803,6 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positi } if (positionsCalculated < 1 ) { // Either Latin1 or DBCS conversion failed so treat as Latin1. - bool useGFree = false; SetConverter(PFont(font_)->characterSet); char *utfForm = UTF8FromIconv(conv, s, len); if (!utfForm) { @@ -1830,11 +1824,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positi } clusterStart = clusterEnd; } - if (useGFree) { - g_free(utfForm); - } else { - delete []utfForm; - } + delete []utfForm; PLATFORM_ASSERT(i == lenPositions); } } @@ -1910,7 +1900,6 @@ int SurfaceImpl::WidthText(Font &font_, const char *s, int len) { char *utfForm = 0; pango_layout_set_font_description(layout, PFont(font_)->pfd); PangoRectangle pos; - bool useGFree = false; if (et == UTF8) { pango_layout_set_text(layout, s, len); } else { @@ -1933,11 +1922,7 @@ int SurfaceImpl::WidthText(Font &font_, const char *s, int len) { PangoLayoutLine *pangoLine = pango_layout_get_line(layout,0); #endif pango_layout_line_get_extents(pangoLine, NULL, &pos); - if (useGFree) { - g_free(utfForm); - } else { - delete []utfForm; - } + delete []utfForm; return PANGO_PIXELS(pos.width); } #ifndef DISABLE_GDK_FONT -- cgit v1.2.3 From 22edeb6d8fd99407534b4f630266ed5c904cf6a1 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 4 Sep 2011 09:47:19 +1000 Subject: Cast to ensure comparison valid. --- src/Editor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Editor.cxx b/src/Editor.cxx index f6b1ea308..347f27318 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -8378,7 +8378,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { return vs.caretStyle; case SCI_SETCARETWIDTH: - if (wParam <= 0) + if (static_cast(wParam) <= 0) vs.caretWidth = 0; else if (wParam >= 3) vs.caretWidth = 3; -- cgit v1.2.3 From 88bd2188c961dd57cc515b285fd7f4812888f5cf Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 4 Sep 2011 10:22:47 +1000 Subject: Autocompletion lists respond to mouse wheel events. Feature #3403600. From David Wolfendale. --- doc/ScintillaHistory.html | 1 + win32/PlatWin.cxx | 32 +++++++++++++++++++++++++++++++- win32/ScintillaWin.cxx | 7 +++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 27430ae52..bfe47bebc 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -383,6 +383,7 @@ Occam's Razor Ben Bluemel + David Wolfendale

diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 6a2f103ba..0ccc8aa13 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1382,6 +1382,7 @@ class ListBoxX : public ListBox { PRectangle rcPreSize; Point dragOffset; Point location; // Caret location at which the list is opened + int wheelDelta; // mouse wheel residue HWND GetHWND() const; void AppendListItem(const char *startword, const char *numword); @@ -1409,7 +1410,7 @@ public: ListBoxX() : lineHeight(10), fontCopy(0), lb(0), unicodeMode(false), desiredVisibleRows(5), maxItemCharacters(0), aveCharWidth(8), parent(NULL), ctrlID(0), doubleClickAction(NULL), doubleClickActionData(NULL), - widestItem(NULL), maxCharWidth(1), resizeHit(0) { + widestItem(NULL), maxCharWidth(1), resizeHit(0), wheelDelta(0) { } virtual ~ListBoxX() { if (fontCopy) { @@ -1986,6 +1987,10 @@ LRESULT PASCAL ListBoxX::ControlWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA } } return 0; + + case WM_MBUTTONDOWN: + // disable the scroll wheel button click action + return 0; } WNDPROC prevWndProc = reinterpret_cast(GetWindowLongPtr(hWnd, GWLP_USERDATA)); @@ -2097,6 +2102,31 @@ LRESULT ListBoxX::WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam } return ::DefWindowProc(hWnd, iMessage, wParam, lParam); + case WM_MOUSEWHEEL: + wheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam); + if (abs(wheelDelta) >= WHEEL_DELTA) { + int nRows = GetVisibleRows(); + int linesToScroll = 1; + if (nRows > 1) { + linesToScroll = nRows - 1; + } + if (linesToScroll > 3) { + linesToScroll = 3; + } + linesToScroll *= (wheelDelta / WHEEL_DELTA); + int top = ::SendMessage(lb, LB_GETTOPINDEX, 0, 0) + linesToScroll; + if (top < 0) { + top = 0; + } + ::SendMessage(lb, LB_SETTOPINDEX, top, 0); + // update wheel delta residue + if (wheelDelta >= 0) + wheelDelta = wheelDelta % WHEEL_DELTA; + else + wheelDelta = - (-wheelDelta % WHEEL_DELTA); + } + break; + default: return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 9925a64bb..d1f450479 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -680,6 +680,13 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam break; case WM_MOUSEWHEEL: + // if autocomplete list active then send mousewheel message to it + if (ac.Active()) { + HWND hWnd = reinterpret_cast(ac.lb->GetID()); + ::SendMessage(hWnd, iMessage, wParam, lParam); + break; + } + // Don't handle datazoom. // (A good idea for datazoom would be to "fold" or "unfold" details. // i.e. if datazoomed out only class structures are visible, when datazooming in the control -- cgit v1.2.3 From 7b37ceb5f14dbc8bf17c03c7b6e202bf023cfac7 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 6 Sep 2011 15:49:25 +1000 Subject: Always use Cairo for drawing. --- gtk/PlatGTK.cxx | 4 +--- gtk/ScintillaGTK.cxx | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 39dba1d71..8fe55145a 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -43,9 +43,7 @@ #define IS_WIDGET_FOCUSSED(w) (GTK_WIDGET_HAS_FOCUS(w)) #endif -#if GTK_CHECK_VERSION(2,22,0) #define USE_CAIRO 1 -#endif #ifdef USE_CAIRO @@ -2961,7 +2959,7 @@ bool Platform::IsDBCSLeadByte(int codePage, char ch) { // Shift_jis return ((uch >= 0x81) && (uch <= 0x9F)) || ((uch >= 0xE0) && (uch <= 0xFC)); - // Lead bytes F0 to FC may be a Microsoft addition. + // Lead bytes F0 to FC may be a Microsoft addition. case 936: // GBK return (uch >= 0x81) && (uch <= 0xFE); diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index b7cea5ed3..0932c6e3b 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -74,9 +74,7 @@ #define IS_WIDGET_VISIBLE(w) (GTK_WIDGET_VISIBLE(w)) #endif -#if GTK_CHECK_VERSION(2,22,0) #define USE_CAIRO 1 -#endif static GdkWindow *WindowFromWidget(GtkWidget *w) { #if GTK_CHECK_VERSION(3,0,0) -- cgit v1.2.3 From 9b4a855ed7962ce5da8c3e538a38f3eb396a8cc7 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 6 Sep 2011 19:50:21 +1000 Subject: Updating for 2.29 release. --- doc/ScintillaDownload.html | 10 +++++----- doc/ScintillaHistory.html | 8 ++++++++ doc/index.html | 7 ++++--- version.txt | 2 +- win32/ScintRes.rc | 8 ++++---- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/doc/ScintillaDownload.html b/doc/ScintillaDownload.html index a5fa814dc..8744778e8 100644 --- a/doc/ScintillaDownload.html +++ b/doc/ScintillaDownload.html @@ -25,9 +25,9 @@ @@ -41,7 +41,7 @@ containing very few restrictions.

- Release 2.28 + Release 2.29

Source Code @@ -49,8 +49,8 @@ The source code package contains all of the source code for Scintilla but no binary executable code and is available in
    -
  • zip format (1200K) commonly used on Windows
  • -
  • tgz format (1080K) commonly used on Linux and compatible operating systems
  • +
  • zip format (1200K) commonly used on Windows
  • +
  • tgz format (1080K) commonly used on Linux and compatible operating systems
Instructions for building on both Windows and Linux are included in the readme file.

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index bfe47bebc..b9423780e 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -395,6 +395,14 @@ Icons Copyright(C) 1998 by Dean S. Jones
+

+ Release 2.29 +

+
    +
  • + Released 12 September 2011. +
  • +

Release 2.28

diff --git a/doc/index.html b/doc/index.html index 815f35d91..277165c19 100644 --- a/doc/index.html +++ b/doc/index.html @@ -9,7 +9,7 @@ - +
- + Windows   - + GTK+/Linux