summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2014-04-01 10:04:07 +0300
committerXhmikosR <xhmikosr@users.sourceforge.net>2014-04-01 10:04:07 +0300
commit8233716c48e81c9e6716cc39b7b884ad0d8c0e3f (patch)
treee9e8cd3b8cdcc4acd8f57f06b624db2dc71e01e5
parent1ed84233cf8faf680dd81fa3b2ef37b1d7686a03 (diff)
downloadnotepad2-mod-8233716c48e81c9e6716cc39b7b884ad0d8c0e3f.zip
notepad2-mod-8233716c48e81c9e6716cc39b7b884ad0d8c0e3f.tar.gz
notepad2-mod-8233716c48e81c9e6716cc39b7b884ad0d8c0e3f.tar.bz2
Update scintilla to 3.4.1.
-rw-r--r--scintilla/doc/ScintillaDownload.html10
-rw-r--r--scintilla/doc/ScintillaHistory.html48
-rw-r--r--scintilla/doc/index.html10
-rw-r--r--scintilla/src/Editor.cxx49
-rw-r--r--scintilla/src/Editor.h2
-rw-r--r--scintilla/src/PositionCache.cxx3
-rw-r--r--scintilla/src/XPM.cxx6
-rw-r--r--scintilla/src/XPM.h1
-rw-r--r--scintilla/version.txt2
-rw-r--r--scintilla/win32/ScintillaWin.cxx8
10 files changed, 103 insertions, 36 deletions
diff --git a/scintilla/doc/ScintillaDownload.html b/scintilla/doc/ScintillaDownload.html
index 1849e8c..3f9e820 100644
--- a/scintilla/doc/ScintillaDownload.html
+++ b/scintilla/doc/ScintillaDownload.html
@@ -25,9 +25,9 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
- <font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla340.zip?download">
+ <font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla341.zip?download">
Windows</a>&nbsp;&nbsp;
- <a href="http://prdownloads.sourceforge.net/scintilla/scintilla340.tgz?download">
+ <a href="http://prdownloads.sourceforge.net/scintilla/scintilla341.tgz?download">
GTK+/Linux</a>&nbsp;&nbsp;
</font>
</td>
@@ -41,7 +41,7 @@
containing very few restrictions.
</p>
<h3>
- Release 3.4.0
+ Release 3.4.1
</h3>
<h4>
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
<ul>
- <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla340.zip?download">zip format</a> (1450K) commonly used on Windows</li>
- <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla340.tgz?download">tgz format</a> (1300K) commonly used on Linux and compatible operating systems</li>
+ <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla341.zip?download">zip format</a> (1450K) commonly used on Windows</li>
+ <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla341.tgz?download">tgz format</a> (1300K) commonly used on Linux and compatible operating systems</li>
</ul>
Instructions for building on both Windows and Linux are included in the readme file.
<h4>
diff --git a/scintilla/doc/ScintillaHistory.html b/scintilla/doc/ScintillaHistory.html
index 3f9ed36..a5eca67 100644
--- a/scintilla/doc/ScintillaHistory.html
+++ b/scintilla/doc/ScintillaHistory.html
@@ -459,6 +459,52 @@
</li>
</ul>
<h3>
+ <a href="http://prdownloads.sourceforge.net/scintilla/scite341.zip?download">Release 3.4.1</a>
+ </h3>
+ <ul>
+ <li>
+ Released 1 April 2014.
+ </li>
+ <li>
+ Display Unicode line ends as [LS], [PS], and [NEL] blobs.
+ </li>
+ <li>
+ Bug fixed where cursor down failed on wrapped lines.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1585/">Bug #1585</a>.
+ </li>
+ <li>
+ Caret positioning changed a little to appear inside characters less often by
+ rounding the caret position to the pixel grid instead of truncating.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1588/">Bug #1588</a>.
+ </li>
+ <li>
+ Bug fixed where automatic indentation wrong when caret in virtual space.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1586/">Bug #1586</a>.
+ </li>
+ <li>
+ Bug fixed on Windows where WM_LBUTTONDBLCLK was no longer sent to window.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1587/">Bug #1587</a>.
+ </li>
+ <li>
+ Bug fixed with SciTE on Windows XP where black stripes appeared inside the find and
+ replace strips.
+ </li>
+ <li>
+ Crash fixed in SciTE with recursive properties files.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1507/">Bug #1507</a>.
+ </li>
+ <li>
+ Bug fixed with SciTE where Ctrl+E before an unmatched end brace jumps to file start.
+ <a href="http://sourceforge.net/p/scintilla/bugs/315/">Bug #315</a>.
+ </li>
+ <li>
+ Fixed scrolling on Cocoa to avoid display glitches and be smoother.
+ </li>
+ <li>
+ Fixed crash on Cocoa when character composition used when autocompletion list active.
+ </li>
+ </ul>
+ <h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite340.zip?download">Release 3.4.0</a>
</h3>
<ul>
@@ -629,7 +675,7 @@
<a href="http://sourceforge.net/p/scintilla/bugs/1553/">Bug #1553</a>.
</li>
<li>
- C++ lexer recognizes C++11 user-defined lierals and applies lexical class SCE_C_USERLITERAL.
+ C++ lexer recognizes C++11 user-defined literals and applies lexical class SCE_C_USERLITERAL.
</li>
<li>
C++ lexer allows single quote characters as digit separators in numeric literals like 123'456 as this is
diff --git a/scintilla/doc/index.html b/scintilla/doc/index.html
index 43f09eb..9115851 100644
--- a/scintilla/doc/index.html
+++ b/scintilla/doc/index.html
@@ -9,7 +9,7 @@
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
<meta name="Description"
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
- <meta name="Date.Modified" content="20140322" />
+ <meta name="Date.Modified" content="20140401" />
<style type="text/css">
#versionlist {
margin: 0;
@@ -55,8 +55,8 @@
GTK+, and OS X</font>
</td>
<td width="40%" align="right">
- <font color="#FFCC99" size="3"> Release version 3.4.0<br />
- Site last modified March 22 2014</font>
+ <font color="#FFCC99" size="3"> Release version 3.4.1<br />
+ Site last modified April 1 2014</font>
</td>
<td width="20%">
&nbsp;
@@ -71,13 +71,11 @@
</tr>
</table>
<ul id="versionlist">
+ <li>Version 3.4.1 fixes a regression in 3.4.0 that stopped the caret moving when lines were wrapped.</li>
<li>Version 3.4.0 finalises the Unicode line ends and substyles features provisionally added in 3.2.5.</li>
<li>Version 3.3.9 fixes a bug in 3.3.8 that caused external lexers to fail.</li>
<li>Version 3.3.8 improves drawing quality and enhances lexers.</li>
<li>Version 3.3.7 uses responsive scrolling on OS X 10.9, enhances lexers, and fixes bugs.</li>
- <li>Version 3.3.6 adds support for the Rust language and fixes bugs.</li>
- <li>Version 3.3.5 can represent characters with strings. This may be used for modes
- which show invisible characters or differentiate characters that appear similar.</li>
</ul>
<ul id="menu">
<li id="remote1"><a href="http://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx
index 5dab852..334643c 100644
--- a/scintilla/src/Editor.cxx
+++ b/scintilla/src/Editor.cxx
@@ -88,6 +88,10 @@ Timer::Timer() :
Idler::Idler() :
state(false), idlerID(0) {}
+static int RoundXYPosition(XYPOSITION xyPos) {
+ return int(xyPos+0.5);
+}
+
static inline bool IsControlCharacter(int ch) {
// iscntrl returns true for lots of chars > 127 which are displayable
return ch >= 0 && ch < ' ';
@@ -269,6 +273,8 @@ void Editor::SetRepresentations() {
char c1[3] = { '\xc2', static_cast<char>(0x80+j), 0 };
reprs.SetRepresentation(c1, repsC1[j]);
}
+ reprs.SetRepresentation("\xe2\x80\xa8", "LS");
+ reprs.SetRepresentation("\xe2\x80\xa9", "PS");
}
// UTF-8 invalid bytes
@@ -382,6 +388,10 @@ PRectangle Editor::GetClientRectangle() {
return wMain.GetClientPosition();
}
+PRectangle Editor::GetClientDrawingRectangle() {
+ return GetClientRectangle();
+}
+
PRectangle Editor::GetTextRectangle() {
PRectangle rc = GetClientRectangle();
rc.left += vs.textStart;
@@ -645,6 +655,10 @@ void Editor::RedrawRect(PRectangle rc) {
}
}
+void Editor::DiscardOverdraw() {
+ // Overridden on platforms that may draw outside visible area.
+}
+
void Editor::Redraw() {
//Platform::DebugPrintf("Redraw all\n");
PRectangle rcClient = GetClientRectangle();
@@ -655,7 +669,10 @@ void Editor::Redraw() {
}
void Editor::RedrawSelMargin(int line, bool allAfter) {
- if (!AbandonPaint()) {
+ bool abandonDraw = false;
+ if (!wMargin.GetID()) // Margin in main window so may need to abandon and retry
+ abandonDraw = AbandonPaint();
+ if (!abandonDraw) {
if (vs.maskInLine) {
Redraw();
} else {
@@ -2540,14 +2557,20 @@ void Editor::DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, Lin
char hexits[4];
const char *ctrlChar;
unsigned char chEOL = ll->chars[eolPos];
+ int styleMain = ll->styles[eolPos];
+ ColourDesired textBack = TextBackground(vsDraw, overrideBackground, background, eolInSelection, false, styleMain, eolPos, ll);
if (UTF8IsAscii(chEOL)) {
ctrlChar = ControlCharacterString(chEOL);
} else {
- sprintf(hexits, "x%2X", chEOL);
- ctrlChar = hexits;
+ Representation *repr = reprs.RepresentationFromCharacter(ll->chars + eolPos, ll->numCharsInLine - eolPos);
+ if (repr) {
+ ctrlChar = repr->stringRep.c_str();
+ eolPos = ll->numCharsInLine;
+ } else {
+ sprintf(hexits, "x%2X", chEOL);
+ ctrlChar = hexits;
+ }
}
- int styleMain = ll->styles[eolPos];
- ColourDesired textBack = TextBackground(vsDraw, overrideBackground, background, eolInSelection, false, styleMain, eolPos, ll);
ColourDesired textFore = vsDraw.styles[styleMain].fore;
if (eolInSelection && vsDraw.selColours.fore.isSet) {
textFore = (eolInSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground;
@@ -3417,7 +3440,7 @@ void Editor::DrawCarets(Surface *surface, ViewStyle &vsDraw, int lineDoc, int xS
bool caretAtEOL = false;
bool drawBlockCaret = false;
XYPOSITION widthOverstrikeCaret;
- int caretWidthOffset = 0;
+ XYPOSITION caretWidthOffset = 0;
PRectangle rcCaret = rcLine;
if (posCaret.Position() == pdoc->Length()) { // At end of document
@@ -3433,11 +3456,11 @@ void Editor::DrawCarets(Surface *surface, ViewStyle &vsDraw, int lineDoc, int xS
widthOverstrikeCaret = 3;
if (xposCaret > 0)
- caretWidthOffset = 1; // Move back so overlaps both character cells.
+ caretWidthOffset = 0.51f; // Move back so overlaps both character cells.
xposCaret += xStart;
if (posDrag.IsValid()) {
/* Dragging text, use a line caret */
- rcCaret.left = xposCaret - caretWidthOffset;
+ rcCaret.left = RoundXYPosition(xposCaret - caretWidthOffset);
rcCaret.right = rcCaret.left + vsDraw.caretWidth;
} else if (inOverstrike && drawOverstrikeCaret) {
/* Overstrike (insert mode), use a modified bar caret */
@@ -3455,7 +3478,7 @@ void Editor::DrawCarets(Surface *surface, ViewStyle &vsDraw, int lineDoc, int xS
}
} else {
/* Line caret */
- rcCaret.left = xposCaret - caretWidthOffset;
+ rcCaret.left = RoundXYPosition(xposCaret - caretWidthOffset);
rcCaret.right = rcCaret.left + vsDraw.caretWidth;
}
ColourDesired caretColour = mainCaret ? vsDraw.caretcolour : vsDraw.additionalCaretColour;
@@ -5090,6 +5113,7 @@ void Editor::NewLine() {
// Remove non-main ranges
InvalidateSelection(sel.RangeMain(), true);
sel.SetSelection(sel.RangeMain());
+ sel.RangeMain().ClearVirtualSpace();
// Clear main range and insert line end
bool needGroupUndo = !sel.Empty();
@@ -6791,7 +6815,7 @@ int Editor::PositionAfterArea(PRectangle rcArea) const {
// The start of the document line after the display line after the area
// This often means that the line after a modification is restyled which helps
// detect multiline comment additions and heals single line comments
- int lineAfter = topLine + (rcArea.bottom - 1) / vs.lineHeight + 1;
+ int lineAfter = TopLineOfMain() + (rcArea.bottom - 1) / vs.lineHeight + 1;
if (lineAfter < cs.LinesDisplayed())
return pdoc->LineStart(cs.DocFromDisplay(lineAfter) + 1);
else
@@ -6801,7 +6825,7 @@ int Editor::PositionAfterArea(PRectangle rcArea) const {
// Style to a position within the view. If this causes a change at end of last line then
// affects later lines so style all the viewed text.
void Editor::StyleToPositionInView(Position pos) {
- int endWindow = (vs.marginInside) ? (PositionAfterArea(GetClientRectangle())) : (pdoc->Length());
+ int endWindow = PositionAfterArea(GetClientDrawingRectangle());
if (pos > endWindow)
pos = endWindow;
int styleAtEnd = pdoc->StyleAt(pos-1);
@@ -6809,6 +6833,9 @@ void Editor::StyleToPositionInView(Position pos) {
if ((endWindow > pos) && (styleAtEnd != pdoc->StyleAt(pos-1))) {
// Style at end of line changed so is multi-line change like starting a comment
// so require rest of window to be styled.
+ DiscardOverdraw(); // Prepared bitmaps may be invalid
+ // DiscardOverdraw may have truncated client drawing area so recalculate endWindow
+ endWindow = PositionAfterArea(GetClientDrawingRectangle());
pdoc->EnsureStyledTo(endWindow);
}
}
diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h
index 98327dc..7579b3f 100644
--- a/scintilla/src/Editor.h
+++ b/scintilla/src/Editor.h
@@ -338,6 +338,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
Point DocumentPointFromView(Point ptView); // Convert a point from view space to document
int TopLineOfMain() const; // Return the line at Main's y coordinate 0
virtual PRectangle GetClientRectangle();
+ virtual PRectangle GetClientDrawingRectangle();
PRectangle GetTextRectangle();
int LinesOnScreen();
@@ -357,6 +358,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
bool AbandonPaint();
virtual void RedrawRect(PRectangle rc);
+ virtual void DiscardOverdraw();
virtual void Redraw();
void RedrawSelMargin(int line=-1, bool allAfter=false);
PRectangle RectangleFromRange(int start, int end);
diff --git a/scintilla/src/PositionCache.cxx b/scintilla/src/PositionCache.cxx
index 5326987..040bf85 100644
--- a/scintilla/src/PositionCache.cxx
+++ b/scintilla/src/PositionCache.cxx
@@ -237,8 +237,9 @@ Point LineLayout::PointFromPosition(int posInLine, int lineHeight) const {
pt.x = positions[posInLine] - positions[rangeSubLine.start];
if (rangeSubLine.start != 0) // Wrapped lines may be indented
pt.x += wrapIndent;
- break;
}
+ } else {
+ break;
}
}
return pt;
diff --git a/scintilla/src/XPM.cxx b/scintilla/src/XPM.cxx
index c810dc2..cce6ab7 100644
--- a/scintilla/src/XPM.cxx
+++ b/scintilla/src/XPM.cxx
@@ -61,11 +61,9 @@ XPM::XPM(const char *const *linesForm) {
}
XPM::~XPM() {
- Clear();
}
void XPM::Init(const char *textForm) {
- Clear();
// Test done is two parts to avoid possibility of overstepping the memory
// if memcmp implemented strangely. Must be 4 bytes at least at destination.
if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) {
@@ -81,7 +79,6 @@ void XPM::Init(const char *textForm) {
}
void XPM::Init(const char *const *linesForm) {
- Clear();
height = 1;
width = 1;
nColours = 1;
@@ -125,9 +122,6 @@ void XPM::Init(const char *const *linesForm) {
}
}
-void XPM::Clear() {
-}
-
void XPM::Draw(Surface *surface, PRectangle &rc) {
if (pixels.empty()) {
return;
diff --git a/scintilla/src/XPM.h b/scintilla/src/XPM.h
index a5e0c3f..91dab2f 100644
--- a/scintilla/src/XPM.h
+++ b/scintilla/src/XPM.h
@@ -30,7 +30,6 @@ public:
~XPM();
void Init(const char *textForm);
void Init(const char *const *linesForm);
- void Clear();
/// Decompose image into runs and use FillRectangle for each run
void Draw(Surface *surface, PRectangle &rc);
int GetHeight() const { return height; }
diff --git a/scintilla/version.txt b/scintilla/version.txt
index ecdd82e..8d6b017 100644
--- a/scintilla/version.txt
+++ b/scintilla/version.txt
@@ -1 +1 @@
-340
+341
diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx
index 2fb6160..7bc542f 100644
--- a/scintilla/win32/ScintillaWin.cxx
+++ b/scintilla/win32/ScintillaWin.cxx
@@ -242,7 +242,7 @@ class ScintillaWin :
virtual void SetCtrlID(int identifier);
virtual int GetCtrlID();
virtual void NotifyParent(SCNotification scn);
- virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
+ virtual void NotifyDoubleClick(Point pt, int modifiers);
virtual CaseFolder *CaseFolderForEncoding();
virtual std::string CaseMapString(const std::string &s, int caseMapping);
virtual void Copy();
@@ -1422,13 +1422,13 @@ void ScintillaWin::NotifyParent(SCNotification scn) {
GetCtrlID(), reinterpret_cast<LPARAM>(&scn));
}
-void ScintillaWin::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) {
+void ScintillaWin::NotifyDoubleClick(Point pt, int modifiers) {
//Platform::DebugPrintf("ScintillaWin Double click 0\n");
- ScintillaBase::NotifyDoubleClick(pt, shift, ctrl, alt);
+ ScintillaBase::NotifyDoubleClick(pt, modifiers);
// Send myself a WM_LBUTTONDBLCLK, so the container can handle it too.
::SendMessage(MainHWND(),
WM_LBUTTONDBLCLK,
- shift ? MK_SHIFT : 0,
+ (modifiers & SCI_SHIFT) ? MK_SHIFT : 0,
MAKELPARAM(pt.x, pt.y));
}