diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-07-08 11:45:06 +0000 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2012-07-08 11:45:06 +0000 |
commit | dadd6de6811ea87689bfb28dd53896ff8c346111 (patch) | |
tree | 331e0146719cc49b467a22426ab77cd2a871e620 | |
parent | 3a6ce3d423cb5825c7ee4f6a8e5dac67f18afbef (diff) | |
download | notepad2-mod-dadd6de6811ea87689bfb28dd53896ff8c346111.zip notepad2-mod-dadd6de6811ea87689bfb28dd53896ff8c346111.tar.gz notepad2-mod-dadd6de6811ea87689bfb28dd53896ff8c346111.tar.bz2 |
update scintilla (HG 3cb9bb515df2)
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@750 28bd50df-7adb-d945-0439-6e466c6a13cc
-rw-r--r-- | Readme-mod.txt | 2 | ||||
-rw-r--r-- | scintilla/doc/ScintillaHistory.html | 2 | ||||
-rw-r--r-- | scintilla/doc/ScintillaRelated.html | 5 | ||||
-rw-r--r-- | scintilla/include/Scintilla.iface | 38 | ||||
-rw-r--r-- | scintilla/lexlib/CharacterSet.h | 16 | ||||
-rw-r--r-- | scintilla/src/Document.cxx | 17 | ||||
-rw-r--r-- | scintilla/src/Editor.cxx | 17 | ||||
-rw-r--r-- | scintilla/win32/PlatWin.cxx | 10 |
8 files changed, 58 insertions, 49 deletions
diff --git a/Readme-mod.txt b/Readme-mod.txt index 2b1a668..c7a0cb0 100644 --- a/Readme-mod.txt +++ b/Readme-mod.txt @@ -31,6 +31,6 @@ Ctrl+Alt+F2 Expand selection to next match. Ctrl+Alt+Shift+F2 Expand selection to previous match.
Ctrl+Shift+Enter New line with toggled auto indent option.
-Notepad2-mod 4.2.25 has been created with Scintilla 3.2.0 HG f6ca0536c769.
+Notepad2-mod 4.2.25 has been created with Scintilla 3.2.0 HG 3cb9bb515df2.
You can use WDK 7.1, MSVC 2010 or Intel C++ Compiler XE 2011 SP1 Update 6 (or newer)
to build Notepad2-mod.
diff --git a/scintilla/doc/ScintillaHistory.html b/scintilla/doc/ScintillaHistory.html index 8814ca4..e7dcf5a 100644 --- a/scintilla/doc/ScintillaHistory.html +++ b/scintilla/doc/ScintillaHistory.html @@ -405,6 +405,8 @@ <td>Philippe Elsass</td>
<td>Dimitar Zhekov</td>
<td>Fan Yang</td>
+ </tr><tr>
+ <td>Denis Shelomovskij</td>
</tr>
</table>
<p>
diff --git a/scintilla/doc/ScintillaRelated.html b/scintilla/doc/ScintillaRelated.html index 01431fa..13e7248 100644 --- a/scintilla/doc/ScintillaRelated.html +++ b/scintilla/doc/ScintillaRelated.html @@ -123,6 +123,11 @@ Projects using Scintilla
</h3>
<p>
+ <a href="https://gitorious.org/qgrinui">QGrinUI</a>
+ searches for a regex within all relevant files in a directory and shows matches using
+ SciTE through the director interface.
+ </p>
+ <p>
<a href="http://foicica.com/textadept/">Textadept</a>
is a ridiculously extensible cross-platform text editor for programmers written (mostly) in
Lua using LPeg to handle the lexers.
diff --git a/scintilla/include/Scintilla.iface b/scintilla/include/Scintilla.iface index 8e2bdb9..beed6e0 100644 --- a/scintilla/include/Scintilla.iface +++ b/scintilla/include/Scintilla.iface @@ -287,13 +287,13 @@ val SC_MASK_FOLDERS=0xFE000000 fun void MarkerDefine=2040(int markerNumber, int markerSymbol)
# Set the foreground colour used for a particular marker number.
-fun void MarkerSetFore=2041(int markerNumber, colour fore)
+set void MarkerSetFore=2041(int markerNumber, colour fore)
# Set the background colour used for a particular marker number.
-fun void MarkerSetBack=2042(int markerNumber, colour back)
+set void MarkerSetBack=2042(int markerNumber, colour back)
# Set the background colour used for a particular marker number when its folding block is selected.
-fun void MarkerSetBackSelected=2292(int markerNumber, colour back)
+set void MarkerSetBackSelected=2292(int markerNumber, colour back)
# Enable/disable highlight for current folding bloc (smallest one that contains the caret)
fun void MarkerEnableHighlight=2293(bool enabled,)
@@ -324,7 +324,7 @@ fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap) fun void MarkerAddSet=2466(int line, int set)
# Set the alpha used for a marker that is drawn in the text area, not the margin.
-fun void MarkerSetAlpha=2476(int markerNumber, int alpha)
+set void MarkerSetAlpha=2476(int markerNumber, int alpha)
enu MarginType=SC_MARGIN_
val SC_MARGIN_SYMBOL=0
@@ -403,7 +403,7 @@ val SC_CHARSET_THAI=222 val SC_CHARSET_8859_15=1000
# Clear all the styles and make equivalent to the global default style.
-set void StyleClearAll=2050(,)
+fun void StyleClearAll=2050(,)
# Set the foreground colour of a style.
set void StyleSetFore=2051(int style, colour fore)
@@ -454,7 +454,7 @@ get int StyleGetSize=2485(int style,) # Get the font of a style.
# Returns the length of the fontName
-fun int StyleGetFont=2486(int style, stringresult fontName)
+get int StyleGetFont=2486(int style, stringresult fontName)
# Get is a style to have its end of line filled or not.
get bool StyleGetEOLFilled=2487(int style,)
@@ -1112,7 +1112,7 @@ val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010 val SC_FOLDFLAG_LEVELNUMBERS=0x0040
# Set some style options for folding.
-fun void SetFoldFlags=2233(int flags,)
+set void SetFoldFlags=2233(int flags,)
# Ensure a particular line is visible by expanding any header line hiding it.
# Use the currently set visibility policy to determine which range to display.
@@ -1281,7 +1281,7 @@ set void SetMultiPaste=2614(int multiPaste,) get int GetMultiPaste=2615(,)
# Retrieve the value of a tag from a regular expression search.
-fun int GetTag=2616(int tagNumber, stringresult tagValue)
+get int GetTag=2616(int tagNumber, stringresult tagValue)
# Make the target range start and end be the same as the selection range start and end.
fun void TargetFromSelection=2287(,)
@@ -1818,11 +1818,11 @@ get int GetPunctuationChars=2649(, stringresult characters) fun void SetCharsDefault=2444(,)
# Get currently selected item position in the auto-completion list
-fun int AutoCGetCurrent=2445(,)
+get int AutoCGetCurrent=2445(,)
# Get currently selected item text in the auto-completion list
# Returns the length of the item text
-fun int AutoCGetCurrentText=2610(, stringresult s)
+get int AutoCGetCurrentText=2610(, stringresult s)
enu CaseInsensitiveBehaviour=SC_CASEINSENSITIVEBEHAVIOUR_
val SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0
@@ -2104,10 +2104,10 @@ get int GetSelections=2570(,) fun void ClearSelections=2571(,)
# Set a simple selection
-fun int SetSelection=2572(int caret,int anchor)
+fun int SetSelection=2572(int caret, int anchor)
# Add a selection
-fun int AddSelection=2573(int caret,int anchor)
+fun int AddSelection=2573(int caret, int anchor)
# Set the main selection
set void SetMainSelection=2574(int selection,)
@@ -2284,11 +2284,11 @@ set void SetLexerLanguage=4006(, string language) fun void LoadLexerLibrary=4007(, string path)
# Retrieve a "property" value previously set with SetProperty.
-fun int GetProperty=4008(string key, stringresult buf)
+get int GetProperty=4008(string key, stringresult buf)
# Retrieve a "property" value previously set with SetProperty,
# with "$()" variable replacement on returned buffer.
-fun int GetPropertyExpanded=4009(string key, stringresult buf)
+get int GetPropertyExpanded=4009(string key, stringresult buf)
# Retrieve a "property" value previously set with SetProperty,
# interpreted as an int AFTER any "$()" variable replacement.
@@ -2325,7 +2325,7 @@ fun int DescribeKeyWordSets=4017(, stringresult descriptions) # Type of modification and the action which caused the modification.
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
# One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
-enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_LAST
+enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL
val SC_MOD_INSERTTEXT=0x1
val SC_MOD_DELETETEXT=0x2
val SC_MOD_CHANGESTYLE=0x4
@@ -2608,10 +2608,10 @@ val SCE_TCL_WORD8=19 val SCE_TCL_COMMENT_BOX=20
val SCE_TCL_BLOCK_COMMENT=21
# Lexical states for SCLEX_HTML, SCLEX_XML
-lex HTML=SCLEX_HTML SCE_H
-lex XML=SCLEX_XML SCE_H
-lex ASP=SCLEX_ASP SCE_H
-lex PHP=SCLEX_PHP SCE_H
+lex HTML=SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_
+lex XML=SCLEX_XML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_
+lex ASP=SCLEX_ASP SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_
+lex PHP=SCLEX_PHP SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_
val SCE_H_DEFAULT=0
val SCE_H_TAG=1
val SCE_H_TAGUNKNOWN=2
diff --git a/scintilla/lexlib/CharacterSet.h b/scintilla/lexlib/CharacterSet.h index 9ce6c10..643359d 100644 --- a/scintilla/lexlib/CharacterSet.h +++ b/scintilla/lexlib/CharacterSet.h @@ -90,7 +90,15 @@ inline bool IsADigit(int ch, int base) { }
inline bool IsASCII(int ch) {
- return ch < 0x80;
+ return (ch >= 0) && (ch < 0x80);
+}
+
+inline bool IsLowerCase(int ch) {
+ return (ch >= 'a') && (ch <= 'z');
+}
+
+inline bool IsUpperCase(int ch) {
+ return (ch >= 'A') && (ch <= 'Z');
}
inline bool IsAlphaNumeric(int ch) {
@@ -109,15 +117,15 @@ inline bool isspacechar(int ch) { }
inline bool iswordchar(int ch) {
- return IsASCII(ch) && (IsAlphaNumeric(ch) || ch == '.' || ch == '_');
+ return IsAlphaNumeric(ch) || ch == '.' || ch == '_';
}
inline bool iswordstart(int ch) {
- return IsASCII(ch) && (IsAlphaNumeric(ch) || ch == '_');
+ return IsAlphaNumeric(ch) || ch == '_';
}
inline bool isoperator(int ch) {
- if (IsASCII(ch) && IsAlphaNumeric(ch))
+ if (IsAlphaNumeric(ch))
return false;
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx index 7edbec7..9f9385e 100644 --- a/scintilla/src/Document.cxx +++ b/scintilla/src/Document.cxx @@ -35,27 +35,10 @@ using namespace Scintilla;
#endif
-// This is ASCII specific but is safe with chars >= 0x80
-static inline bool isspacechar(unsigned char ch) {
- return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
-}
-
static inline bool IsPunctuation(char ch) {
return isascii(ch) && ispunct(ch);
}
-static inline bool IsADigit(char ch) {
- return isascii(ch) && isdigit(ch);
-}
-
-static inline bool IsLowerCase(char ch) {
- return isascii(ch) && islower(ch);
-}
-
-static inline bool IsUpperCase(char ch) {
- return isascii(ch) && isupper(ch);
-}
-
void LexInterface::Colourise(int start, int end) {
if (pdoc && instance && !performingStyle) {
// Protect against reentrance, which may occur, for example, when
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index 03b0bb0..e6929fb 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -663,7 +663,8 @@ PRectangle Editor::RectangleFromRange(int start, int end) { int maxLine = cs.DisplayFromDoc(lineDocMax) + cs.GetHeight(lineDocMax) - 1;
PRectangle rcClient = GetTextRectangle();
PRectangle rc;
- rc.left = vs.fixedColumnWidth;
+ const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0;
+ rc.left = vs.fixedColumnWidth - leftTextOverlap;
rc.top = (minLine - topLine) * vs.lineHeight;
if (rc.top < 0)
rc.top = 0;
@@ -3242,6 +3243,8 @@ void Editor::DrawBlockCaret(Surface *surface, ViewStyle &vsDraw, LineLayout *ll, // See if the next character shares horizontal space, if so we'll
// need to draw that too.
+ if (offsetFirstChar < 0)
+ offsetFirstChar = 0;
numCharsToDraw = offsetLastChar - offsetFirstChar;
while ((offsetLastChar < ll->LineStart(subLine + 1)) && (offsetLastChar <= ll->numCharsInLine)) {
// Update posAfter to point to the 2nd next char, this is where
@@ -3501,8 +3504,12 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { }
//Platform::DebugPrintf("start display %d, offset = %d\n", pdoc->Length(), xOffset);
+ // Allow text at start of line to overlap 1 pixel into the margin as this displays
+ // serifs and italic stems for aliased text.
+ const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0;
+
// Do the painting
- if (rcArea.right > vs.fixedColumnWidth) {
+ if (rcArea.right > vs.fixedColumnWidth - leftTextOverlap) {
Surface *surface = surfaceWindow;
if (bufferedDraw) {
@@ -3523,10 +3530,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { rcTextArea.left = vs.fixedColumnWidth;
rcTextArea.right -= vs.rightMarginWidth;
- // Allow text at start of line to overlap 1 pixel into the margin as this displays
- // serifs and italic stems for aliased text.
- const int leftTextOverlap = ((xOffset == 0) && (vs.leftMarginWidth > 0)) ? 1 : 0;
-
// Remove selection margin from drawing area so text will not be drawn
// on it in unbuffered mode.
if (!bufferedDraw) {
@@ -6961,10 +6964,10 @@ void Editor::EnsureLineVisible(int lineDoc, bool enforcePolicy) { }
int Editor::GetTag(char *tagValue, int tagNumber) {
- char name[3] = "\\?";
const char *text = 0;
int length = 0;
if ((tagNumber >= 1) && (tagNumber <= 9)) {
+ char name[3] = "\\?";
name[1] = static_cast<char>(tagNumber + '0');
length = 2;
text = pdoc->SubstituteByPosition(name, &length);
diff --git a/scintilla/win32/PlatWin.cxx b/scintilla/win32/PlatWin.cxx index 483e981..fa52f5c 100644 --- a/scintilla/win32/PlatWin.cxx +++ b/scintilla/win32/PlatWin.cxx @@ -1574,12 +1574,16 @@ void SurfaceD2D::Copy(PRectangle rc, Point from, Surface &surfaceSource) { }
}
-void SurfaceD2D::DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, UINT) {
+void SurfaceD2D::DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, UINT fuOptions) {
SetFont(font_);
// Use Unicode calls
const TextWide tbuf(s, len, unicodeMode, codePage);
if (pRenderTarget && pTextFormat && pBrush) {
+ if (fuOptions & ETO_CLIPPED) {
+ D2D1_RECT_F rcClip = {rc.left, rc.top, rc.right, rc.bottom};
+ pRenderTarget->PushAxisAlignedClip(rcClip, D2D1_ANTIALIAS_MODE_ALIASED);
+ }
// Explicitly creating a text layout appears a little faster
IDWriteTextLayout *pTextLayout;
@@ -1590,6 +1594,10 @@ void SurfaceD2D::DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, co pRenderTarget->DrawTextLayout(origin, pTextLayout, pBrush, D2D1_DRAW_TEXT_OPTIONS_NONE);
pTextLayout->Release();
}
+
+ if (fuOptions & ETO_CLIPPED) {
+ pRenderTarget->PopAxisAlignedClip();
+ }
}
}
|