summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2014-03-22 09:18:14 +0200
committerXhmikosR <xhmikosr@users.sourceforge.net>2014-03-22 09:37:54 +0200
commit1ed84233cf8faf680dd81fa3b2ef37b1d7686a03 (patch)
treed27f908e0a2dda782242b1612d03382d479de6b0
parente7a0f350adc29d7a46bab8ff6ad501a7e6e41cec (diff)
downloadnotepad2-mod-1ed84233cf8faf680dd81fa3b2ef37b1d7686a03.zip
notepad2-mod-1ed84233cf8faf680dd81fa3b2ef37b1d7686a03.tar.gz
notepad2-mod-1ed84233cf8faf680dd81fa3b2ef37b1d7686a03.tar.bz2
Update scintilla to 3.4.0.4.2.25.904
-rw-r--r--scintilla/cppcheck.suppress4
-rw-r--r--scintilla/doc/ScintillaDoc.html39
-rw-r--r--scintilla/doc/ScintillaDownload.html10
-rw-r--r--scintilla/doc/ScintillaHistory.html221
-rw-r--r--scintilla/doc/index.html7
-rw-r--r--scintilla/include/Platform.h12
-rw-r--r--scintilla/include/SciLexer.h1
-rw-r--r--scintilla/include/Scintilla.h33
-rw-r--r--scintilla/include/Scintilla.iface103
-rw-r--r--scintilla/lexers/LexAsm.cxx13
-rw-r--r--scintilla/lexers/LexCoffeeScript.cxx12
-rw-r--r--scintilla/lexers/LexFortran.cxx42
-rw-r--r--scintilla/lexers/LexMarkdown.cxx8
-rw-r--r--scintilla/lexers/LexTxt2tags.cxx8
-rw-r--r--scintilla/scripts/HFacer.py5
-rw-r--r--scintilla/scripts/ScintillaData.py29
-rw-r--r--scintilla/src/Catalogue.cxx1
-rw-r--r--scintilla/src/Editor.cxx115
-rw-r--r--scintilla/src/Editor.h6
-rw-r--r--scintilla/src/PerLine.cxx6
-rw-r--r--scintilla/src/PositionCache.cxx49
-rw-r--r--scintilla/src/PositionCache.h3
-rw-r--r--scintilla/src/ScintillaBase.cxx10
-rw-r--r--scintilla/src/ViewStyle.cxx9
-rw-r--r--scintilla/src/ViewStyle.h4
-rw-r--r--scintilla/version.txt2
-rw-r--r--scintilla/win32/PlatWin.cxx3
-rw-r--r--scintilla/win32/ScintillaWin.cxx24
28 files changed, 435 insertions, 344 deletions
diff --git a/scintilla/cppcheck.suppress b/scintilla/cppcheck.suppress
index a872c08..212afad 100644
--- a/scintilla/cppcheck.suppress
+++ b/scintilla/cppcheck.suppress
@@ -12,15 +12,12 @@ useInitializationList:scintilla/lexers/LexBasic.cxx
noCopyConstructor:scintilla/lexers/LexBash.cxx
variableScope:scintilla/lexers/LexBash.cxx
variableScope:scintilla/lexers/LexCmake.cxx
-variableScope:scintilla/lexers/LexCoffeeScript.cxx
variableScope:scintilla/lexers/LexCSS.cxx
useInitializationList:scintilla/lexers/LexD.cxx
variableScope:scintilla/lexers/LexErlang.cxx
-variableScope:scintilla/lexers/LexFortran.cxx
variableScope:scintilla/lexers/LexGui4Cli.cxx
variableScope:scintilla/lexers/LexInno.cxx
variableScope:scintilla/lexers/LexLaTeX.cxx
-variableScope:scintilla/lexers/LexMarkdown.cxx
variableScope:scintilla/lexers/LexMetapost.cxx
variableScope:scintilla/lexers/LexModula.cxx
variableScope:scintilla/lexers/LexNimrod.cxx
@@ -35,7 +32,6 @@ variableScope:scintilla/lexers/LexSpecman.cxx
unreadVariable:scintilla/lexers/LexSpice.cxx
invalidscanf:scintilla/lexers/LexTCMD.cxx
variableScope:scintilla/lexers/LexTeX.cxx
-variableScope:scintilla/lexers/LexTxt2tags.cxx
variableScope:scintilla/lexers/LexVHDL.cxx
// Suppress C-style pointer casting for Qt code as won't be changing
diff --git a/scintilla/doc/ScintillaDoc.html b/scintilla/doc/ScintillaDoc.html
index 781695a..081c460 100644
--- a/scintilla/doc/ScintillaDoc.html
+++ b/scintilla/doc/ScintillaDoc.html
@@ -2256,8 +2256,8 @@ struct Sci_TextToFind {
<h2 id="LineEndings">Line endings</h2>
- <p>Scintilla can handle the major line end conventions <span class="provisional">and, depending on settings and
- the current lexer also support additional Unicode line ends</span>.</p>
+ <p>Scintilla can handle the major line end conventions and, depending on settings and
+ the current lexer also support additional Unicode line ends.</p>
<p>Scintilla can interpret any of the Macintosh (\r), Unix (\n) and Windows (\r\n)
line ends.
@@ -2267,12 +2267,10 @@ struct Sci_TextToFind {
entire document to one of these line endings with <code>SCI_CONVERTEOLS</code>. Finally, you
can choose to display the line endings with <code>SCI_SETVIEWEOL</code>.</p>
-<div class="provisional">
<p>For the UTF-8 encoding, three additional Unicode line ends,
Next Line (<code>NEL=U+0085</code>), Line Separator (<code>LS=U+2028</code>), and Paragraph Separator (<code>PS=U+2029</code>)
may optionally be interpreted when Unicode line ends is turned on and the current lexer also supports
Unicode line ends.</p>
-</div>
<a class="message" href="#SCI_SETEOLMODE">SCI_SETEOLMODE(int eolMode)</a><br />
<a class="message" href="#SCI_GETEOLMODE">SCI_GETEOLMODE</a><br />
@@ -2280,12 +2278,10 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_SETVIEWEOL">SCI_SETVIEWEOL(bool visible)</a><br />
<a class="message" href="#SCI_GETVIEWEOL">SCI_GETVIEWEOL</a><br />
-<div class="provisional">
<a class="message" href="#SCI_GETLINEENDTYPESSUPPORTED">SCI_GETLINEENDTYPESSUPPORTED</a><br />
<a class="message" href="#SCI_SETLINEENDTYPESALLOWED">SCI_SETLINEENDTYPESALLOWED(int lineEndBitSet)</a><br />
<a class="message" href="#SCI_GETLINEENDTYPESALLOWED">SCI_GETLINEENDTYPESALLOWED</a><br />
<a class="message" href="#SCI_GETLINEENDTYPESACTIVE">SCI_GETLINEENDTYPESACTIVE</a><br />
-</div>
<p><b id="SCI_SETEOLMODE">SCI_SETEOLMODE(int eolMode)</b><br />
<b id="SCI_GETEOLMODE">SCI_GETEOLMODE</b><br />
@@ -2307,9 +2303,6 @@ struct Sci_TextToFind {
<code>(CR)</code>, <code>(LF)</code>, or <code>(CR)(LF)</code>. <code>SCI_GETVIEWEOL</code>
returns the current state.</p>
-<div class="provisional">
- <a href="#ProvisionalMessages">These features are provisional</a><br />
-
<p><b id="SCI_GETLINEENDTYPESSUPPORTED">SCI_GETLINEENDTYPESSUPPORTED</b><br />
<code>SCI_GETLINEENDTYPESSUPPORTED</code> reports the different types of line ends supported
by the current lexer. This is a bit set although there is currently only a single choice
@@ -2326,7 +2319,6 @@ struct Sci_TextToFind {
<p><b id="SCI_GETLINEENDTYPESACTIVE">SCI_GETLINEENDTYPESACTIVE</b><br />
<code>SCI_GETLINEENDTYPESACTIVE</code> reports the set of line ends currently interpreted
by Scintilla. It is <code>SCI_GETLINEENDTYPESSUPPORTED &amp; SCI_GETLINEENDTYPESALLOWED</code>.</p>
-</div>
<h2 id="Styling">Styling</h2>
@@ -3533,7 +3525,7 @@ struct Sci_TextToFind {
<p>The markers are drawn in the order of their numbers, so higher numbered markers appear on
top of lower numbered ones. Markers try to move with their text by tracking where the start of
their line moves. When a line is deleted, its markers are combined, by an <code>OR</code>
- operation, with the markers of the previous line.</p>
+ operation, with the markers of the next line.</p>
<code><a class="message" href="#SCI_MARKERDEFINE">SCI_MARKERDEFINE(int markerNumber, int
markerSymbols)</a><br />
<a class="message" href="#SCI_MARKERDEFINEPIXMAP">SCI_MARKERDEFINEPIXMAP(int markerNumber,
@@ -5625,11 +5617,12 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p><b id="SCI_SETWRAPMODE">SCI_SETWRAPMODE(int wrapMode)</b><br />
<b id="SCI_GETWRAPMODE">SCI_GETWRAPMODE</b><br />
Set wrapMode to <code>SC_WRAP_WORD</code> (1) to enable wrapping
- on word boundaries, <code>SC_WRAP_CHAR</code> (2) to enable wrapping
- between any characters, and to <code>SC_WRAP_NONE</code> (0) to disable line
- wrapping. <code>SC_WRAP_CHAR</code> is preferred to
- <code>SC_WRAP_WORD</code> for Asian languages where there is no white space
- between words.</p>
+ on word or style boundaries, <code>SC_WRAP_CHAR</code> (2) to enable wrapping
+ between any characters, <code>SC_WRAP_WHITESPACE</code> (3) to enable
+ wrapping on whitespace, and <code>SC_WRAP_NONE</code> (0) to disable line
+ wrapping. <code>SC_WRAP_CHAR</code> is preferred for Asian languages where
+ there is no white space between words.
+ </p>
<p><b id="SCI_SETWRAPVISUALFLAGS">SCI_SETWRAPVISUALFLAGS(int wrapVisualFlags)</b><br />
@@ -5962,7 +5955,6 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
*keyWordList)</a><br />
<a class="message" href="#SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED</a><br />
-<div class="provisional">
<a class="message" href="#SCI_GETSUBSTYLEBASES">SCI_GETSUBSTYLEBASES(&lt;unused&gt;, char *styles)</a><br />
<a class="message" href="#SCI_DISTANCETOSECONDARYSTYLES">SCI_DISTANCETOSECONDARYSTYLES</a><br />
<a class="message" href="#SCI_ALLOCATESUBSTYLES">SCI_ALLOCATESUBSTYLES(int styleBase, int numberStyles)</a><br />
@@ -5972,7 +5964,6 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<a class="message" href="#SCI_GETSTYLEFROMSUBSTYLE">SCI_GETSTYLEFROMSUBSTYLE(int subStyle)</a><br />
<a class="message" href="#SCI_GETPRIMARYSTYLEFROMSTYLE">SCI_GETPRIMARYSTYLEFROMSTYLE(int style)</a><br />
<a class="message" href="#SCI_SETIDENTIFIERS">SCI_SETIDENTIFIERS(int style, const char *identifiers)</a><br />
-</div>
<p><b id="SCI_SETLEXER">SCI_SETLEXER(int lexer)</b><br />
<b id="SCI_GETLEXER">SCI_GETLEXER</b><br />
@@ -6117,9 +6108,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
to <a class="message" href="#SCI_SETSTYLEBITS">SCI_SETSTYLEBITS</a>.
</p>
-<div class="provisional">
<h3 id="Substyles">Substyles</h3>
- <a href="#ProvisionalMessages">These features are provisional</a><br />
<p>Lexers may support several different sublanguages and each sublanguage may want to style some number of
sets of identifiers (or similar lexemes such as documentation keywords) uniquely. Preallocating a large number for each
purpose would exhaust the number of allowed styles quickly.
@@ -6153,7 +6142,6 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p><b id="SCI_SETIDENTIFIERS">SCI_SETIDENTIFIERS(int style, const char *identifiers)</b><br />
Similar to <code>SCI_SETKEYWORDS</code> but for substyles.
The prefix feature available with <code>SCI_SETKEYWORDS</code> is not implemented for <code>SCI_SETIDENTIFIERS</code>.</p>
-</div>
<h2 id="LexerObjects">Lexer Objects</h2>
@@ -6253,6 +6241,9 @@ A simple approach is to return 0 if there is any possibility that a change requi
optimisation could be to remember where a setting first affects the document and return that position.
</p>
+<p><code>Version</code> returns an enumerated value specifying which version of the interface is implemented:
+<code>lvOriginal</code> for <code>ILexer</code> and <code>lvSubStyles</code> for <code>ILexerWithSubStyles</code>.</p>
+
<p><code>Release</code> is called to destroy the lexer object.</p>
<p><code>PrivateCall</code> allows for direct communication between the
@@ -6269,9 +6260,9 @@ needs to be folded as this allowed fixing up the last line from the previous fol
The new approach allows the lexer to decide whether to backtrack or to handle this
more efficiently.</p>
-<h4 class="provisional">ILexerWithSubStyles</h4>
+<h4>ILexerWithSubStyles</h4>
-<p class="provisional">
+<p>
To allow lexers to report which line ends they support, and to support substyles,
<code>Ilexer</code> is extended to <code>ILexerWithSubStyles</code>.
</p>
@@ -7396,6 +7387,8 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
<p>Provisional features are displayed in this document with <span class="provisional">a distinctive background colour</span>.</p>
+ <p>There are currently no provisional features.</p>
+
<p>Some developers may want to only use features that are stable and have graduated from
provisional status. To avoid using provisional messages compile with the symbol
<code>SCI_DISABLE_PROVISIONAL</code> defined.</p>
diff --git a/scintilla/doc/ScintillaDownload.html b/scintilla/doc/ScintillaDownload.html
index 41da11c..1849e8c 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/scintilla339.zip?download">
+ <font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla340.zip?download">
Windows</a>&nbsp;&nbsp;
- <a href="http://prdownloads.sourceforge.net/scintilla/scintilla339.tgz?download">
+ <a href="http://prdownloads.sourceforge.net/scintilla/scintilla340.tgz?download">
GTK+/Linux</a>&nbsp;&nbsp;
</font>
</td>
@@ -41,7 +41,7 @@
containing very few restrictions.
</p>
<h3>
- Release 3.3.9
+ Release 3.4.0
</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/scintilla339.zip?download">zip format</a> (1450K) commonly used on Windows</li>
- <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla339.tgz?download">tgz format</a> (1300K) commonly used on Linux and compatible operating systems</li>
+ <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>
</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 4c9c14b..3f9ed36 100644
--- a/scintilla/doc/ScintillaHistory.html
+++ b/scintilla/doc/ScintillaHistory.html
@@ -64,382 +64,389 @@
<td>John Ehresman</td>
<td>Steffen Goeldner</td>
<td>Deepak S.</td>
- <td>Yann Gaillard</td>
+ <td><a href="http://www.develop.com">DevelopMentor</a></td>
</tr><tr>
+ <td>Yann Gaillard</td>
<td>Aubin Paul</td>
<td>Jason Diamond</td>
<td>Ahmad Baitalmal</td>
- <td>Paul Winwood</td>
</tr><tr>
+ <td>Paul Winwood</td>
<td>Maxim Baranov</td>
<td>Ragnar Højland</td>
<td>Christian Obrecht</td>
- <td>Andreas Neukoetter</td>
</tr><tr>
+ <td>Andreas Neukoetter</td>
<td>Adam Gates</td>
<td>Steve Lhomme</td>
<td>Ferdinand Prantl</td>
- <td>Jan Dries</td>
</tr><tr>
+ <td>Jan Dries</td>
<td>Markus Gritsch</td>
<td>Tahir Karaca</td>
<td>Ahmad Zawawi</td>
- <td>Laurent le Tynevez</td>
</tr><tr>
+ <td>Laurent le Tynevez</td>
<td>Walter Braeu</td>
<td>Ashley Cambrell</td>
<td>Garrett Serack</td>
- <td>Holger Schmidt</td>
</tr><tr>
+ <td>Holger Schmidt</td>
<td><a href="http://www.activestate.com">ActiveState</a></td>
<td>James Larcombe</td>
<td>Alexey Yutkin</td>
- <td>Jan Hercek</td>
</tr><tr>
+ <td>Jan Hercek</td>
<td>Richard Pecl</td>
<td>Edward K. Ream</td>
<td>Valery Kondakoff</td>
- <td>Smári McCarthy</td>
</tr><tr>
+ <td>Smári McCarthy</td>
<td>Clemens Wyss</td>
<td>Simon Steele</td>
<td>Serge A. Baranov</td>
- <td>Xavier Nodet</td>
</tr><tr>
+ <td>Xavier Nodet</td>
<td>Willy Devaux</td>
<td>David Clain</td>
<td>Brendon Yenson</td>
- <td>Vamsi Potluru</td>
</tr><tr>
+ <td><a href="http://www.baanboard.com">Vamsi Potluru</td>
<td>Praveen Ambekar</td>
<td>Alan Knowles</td>
<td>Kengo Jinno</td>
- <td>Valentin Valchev</td>
</tr><tr>
+ <td>Valentin Valchev</td>
<td>Marcos E. Wurzius</td>
<td>Martin Alderson</td>
<td>Robert Gustavsson</td>
- <td>José Fonseca</td>
</tr><tr>
+ <td>José Fonseca</td>
<td>Holger Kiemes</td>
<td>Francis Irving</td>
<td>Scott Kirkwood</td>
- <td>Brian Quinlan</td>
</tr><tr>
+ <td>Brian Quinlan</td>
<td>Ubi</td>
<td>Michael R. Duerig</td>
<td>Deepak T</td>
- <td>Don Paul Beletsky</td>
</tr><tr>
+ <td>Don Paul Beletsky</td>
<td>Gerhard Kalab</td>
<td>Olivier Dagenais</td>
<td>Josh Wingstrom</td>
- <td>Bruce Dodson</td>
</tr><tr>
+ <td>Bruce Dodson</td>
<td>Sergey Koshcheyev</td>
<td>Chuan-jian Shen</td>
<td>Shane Caraveo</td>
- <td>Alexander Scripnik</td>
</tr><tr>
+ <td>Alexander Scripnik</td>
<td>Ryan Christianson</td>
<td>Martin Steffensen</td>
<td>Jakub Vrána</td>
- <td>The Black Horus</td>
</tr><tr>
+ <td>The Black Horus</td>
<td>Bernd Kreuss</td>
<td>Thomas Lauer</td>
<td>Mike Lansdaal</td>
- <td>Yukihiro Nakai</td>
</tr><tr>
+ <td>Yukihiro Nakai</td>
<td>Jochen Tucht</td>
<td>Greg Smith</td>
<td>Steve Schoettler</td>
- <td>Mauritius Thinnes</td>
</tr><tr>
+ <td>Mauritius Thinnes</td>
<td>Darren Schroeder</td>
<td>Pedro Guerreiro</td>
+ <td>Steven te Brinke</td>
+ </tr><tr>
<td>Dan Petitt</td>
<td>Biswapesh Chattopadhyay</td>
- </tr><tr>
<td>Kein-Hong Man</td>
<td>Patrizio Bekerle</td>
+ </tr><tr>
<td>Nigel Hathaway</td>
<td>Hrishikesh Desai</td>
- </tr><tr>
<td>Sergey Puljajev</td>
<td>Mathias Rauen</td>
- <td>Angelo Mandato</td>
- <td>Denis Sureau</td>
</tr><tr>
+ <td><a href="http://www.spaceblue.com">Angelo Mandato</a></td>
+ <td>Denis Sureau</td>
<td>Kaspar Schiess</td>
<td>Christoph Hösler</td>
+ </tr><tr>
<td>João Paulo F Farias</td>
<td>Ron Schofield</td>
- </tr><tr>
<td>Stefan Wosnik</td>
<td>Marius Gheorghe</td>
+ </tr><tr>
<td>Naba Kumar</td>
<td>Sean O'Dell</td>
- </tr><tr>
<td>Stefanos Togoulidis</td>
<td>Hans Hagen</td>
+ </tr><tr>
<td>Jim Cape</td>
<td>Roland Walter</td>
- </tr><tr>
<td>Brian Mosher</td>
<td>Nicholas Nemtsev</td>
+ </tr><tr>
<td>Roy Wood</td>
<td>Peter-Henry Mander</td>
- </tr><tr>
<td>Robert Boucher</td>
<td>Christoph Dalitz</td>
+ </tr><tr>
<td>April White</td>
<td>S. Umar</td>
- </tr><tr>
<td>Trent Mick</td>
<td>Filip Yaghob</td>
+ </tr><tr>
<td>Avi Yegudin</td>
<td>Vivi Orunitia</td>
- </tr><tr>
<td>Manfred Becker</td>
<td>Dimitris Keletsekis</td>
+ </tr><tr>
<td>Yuiga</td>
<td>Davide Scola</td>
- </tr><tr>
<td>Jason Boggs</td>
<td>Reinhold Niesner</td>
+ </tr><tr>
<td>Jos van der Zande</td>
<td>Pescuma</td>
- </tr><tr>
<td>Pavol Bosik</td>
<td>Johannes Schmid</td>
+ </tr><tr>
<td>Blair McGlashan</td>
<td>Mikael Hultgren</td>
- </tr><tr>
<td>Florian Balmer</td>
<td>Hadar Raz</td>
+ </tr><tr>
<td>Herr Pfarrer</td>
<td>Ben Key</td>
- </tr><tr>
<td>Gene Barry</td>
<td>Niki Spahiev</td>
+ </tr><tr>
<td>Carsten Sperber</td>
<td>Phil Reid</td>
- </tr><tr>
<td>Iago Rubio</td>
<td>Régis Vaquette</td>
+ </tr><tr>
<td>Massimo Corà</td>
<td>Elias Pschernig</td>
- </tr><tr>
<td>Chris Jones</td>
<td>Josiah Reynolds</td>
+ </tr><tr>
<td>Robert Roessler <a href="http://www.rftp.com">rftp.com</a></td>
<td>Steve Donovan</td>
- </tr><tr>
<td>Jan Martin Pettersen</td>
<td>Sergey Philippov</td>
+ </tr><tr>
<td>Borujoa</td>
<td>Michael Owens</td>
- </tr><tr>
<td>Franck Marcia</td>
<td>Massimo Maria Ghisalberti</td>
+ </tr><tr>
<td>Frank Wunderlich</td>
<td>Josepmaria Roca</td>
- </tr><tr>
<td>Tobias Engvall</td>
<td>Suzumizaki Kimitaka</td>
+ </tr><tr>
<td>Michael Cartmell</td>
<td>Pascal Hurni</td>
- </tr><tr>
<td>Andre</td>
<td>Randy Butler</td>
+ </tr><tr>
<td>Georg Ritter</td>
<td>Michael Goffioul</td>
- </tr><tr>
<td>Ben Harper</td>
<td>Adam Strzelecki</td>
+ </tr><tr>
<td>Kamen Stanev</td>
<td>Steve Menard</td>
- </tr><tr>
<td>Oliver Yeoh</td>
<td>Eric Promislow</td>
+ </tr><tr>
<td>Joseph Galbraith</td>
<td>Jeffrey Ren</td>
- </tr><tr>
<td>Armel Asselin</td>
<td>Jim Pattee</td>
+ </tr><tr>
<td>Friedrich Vedder</td>
<td>Sebastian Pipping</td>
- </tr><tr>
<td>Andre Arpin</td>
<td>Stanislav Maslovski</td>
+ </tr><tr>
<td>Martin Stone</td>
<td>Fabien Proriol</td>
- </tr><tr>
<td>mimir</td>
<td>Nicola Civran</td>
+ </tr><tr>
<td>Snow</td>
<td>Mitchell Foral</td>
- </tr><tr>
<td>Pieter Holtzhausen</td>
<td>Waldemar Augustyn</td>
+ </tr><tr>
<td>Jason Haslam</td>
<td>Sebastian Steinlechner</td>
- </tr><tr>
<td>Chris Rickard</td>
<td>Rob McMullen</td>
+ </tr><tr>
<td>Stefan Schwendeler</td>
<td>Cristian Adam</td>
- </tr><tr>
<td>Nicolas Chachereau</td>
<td>Istvan Szollosi</td>
+ </tr><tr>
<td>Xie Renhui</td>
<td>Enrico Tröger</td>
- </tr><tr>
<td>Todd Whiteman</td>
<td>Yuval Papish</td>
+ </tr><tr>
<td>instanton</td>
<td>Sergio Lucato</td>
- </tr><tr>
<td>VladVRO</td>
<td>Dmitry Maslov</td>
+ </tr><tr>
<td>chupakabra</td>
<td>Juan Carlos Arevalo Baeza</td>
- </tr><tr>
<td>Nick Treleaven</td>
<td>Stephen Stagg</td>
+ </tr><tr>
<td>Jean-Paul Iribarren</td>
<td>Tim Gerundt</td>
- </tr><tr>
<td>Sam Harwell</td>
<td>Boris</td>
+ </tr><tr>
<td>Jason Oster</td>
<td>Gertjan Kloosterman</td>
- </tr><tr>
<td>alexbodn</td>
<td>Sergiu Dotenco</td>
+ </tr><tr>
<td>Anders Karlsson</td>
<td>ozlooper</td>
- </tr><tr>
<td>Marko Njezic</td>
<td>Eugen Bitter</td>
+ </tr><tr>
<td>Christoph Baumann</td>
<td>Christopher Bean</td>
- </tr><tr>
<td>Sergey Kishchenko</td>
<td>Kai Liu</td>
+ </tr><tr>
<td>Andreas Rumpf</td>
<td>James Moffatt</td>
- </tr><tr>
<td>Yuzhou Xin</td>
<td>Nic Jansma</td>
+ </tr><tr>
<td>Evan Jones</td>
<td>Mike Lischke</td>
- </tr><tr>
<td>Eric Kidd</td>
<td>maXmo</td>
+ </tr><tr>
<td>David Severwright</td>
<td>Jon Strait</td>
- </tr><tr>
<td>Oliver Kiddle</td>
<td>Etienne Girondel</td>
+ </tr><tr>
<td>Haimag Ren</td>
<td>Andrey Moskalyov</td>
- </tr><tr>
<td>Xavi</td>
<td>Toby Inkster</td>
+ </tr><tr>
<td>Eric Forgeot</td>
<td>Colomban Wendling</td>
- </tr><tr>
<td>Neo</td>
<td>Jordan Russell</td>
+ </tr><tr>
<td>Farshid Lashkari</td>
<td>Sam Rawlins</td>
- </tr><tr>
<td>Michael Mullin</td>
<td>Carlos SS</td>
+ </tr><tr>
<td>vim</td>
<td>Martial Demolins</td>
- </tr><tr>
<td>Tino Weinkauf</td>
<td>Jérôme Laforge</td>
+ </tr><tr>
<td>Udo Lechner</td>
<td>Marco Falda</td>
- </tr><tr>
<td>Dariusz Knociński</td>
<td>Ben Fisher</td>
+ </tr><tr>
<td>Don Gobin</td>
<td>John Yeung</td>
- </tr><tr>
<td>Adobe</td>
<td>Elizabeth A. Irizarry</td>
+ </tr><tr>
<td>Mike Schroeder</td>
<td>Morten MacFly</td>
- </tr><tr>
<td>Jaime Gimeno</td>
<td>Thomas Linder Puls</td>
+ </tr><tr>
<td>Artyom Zuikov</td>
<td>Gerrit</td>
- </tr><tr>
<td>Occam's Razor</td>
<td>Ben Bluemel</td>
+ </tr><tr>
<td>David Wolfendale</td>
<td>Chris Angelico</td>
- </tr><tr>
<td>Marat Dukhan</td>
<td>Stefan Weil</td>
+ </tr><tr>
<td>Rex Conn</td>
<td>Ross McKay</td>
- </tr><tr>
<td>Bruno Barbieri</td>
<td>Gordon Smith</td>
+ </tr><tr>
<td>dimitar</td>
<td>Sébastien Granjoux</td>
- </tr><tr>
<td>zeniko</td>
<td>James Ribe</td>
+ </tr><tr>
<td>Markus Nißl</td>
<td>Martin Panter</td>
- </tr><tr>
<td>Mark Yen</td>
<td>Philippe Elsass</td>
+ </tr><tr>
<td>Dimitar Zhekov</td>
<td>Fan Yang</td>
- </tr><tr>
<td>Denis Shelomovskij</td>
<td>darmar</td>
+ </tr><tr>
<td>John Vella</td>
<td>Chinh Nguyen</td>
- </tr><tr>
<td>Sakshi Verma</td>
<td>Joel B. Mohler</td>
+ </tr><tr>
<td>Isiledhel</td>
<td>Vidya Wasi</td>
- </tr><tr>
<td>G. Hu</td>
<td>Byron Hawkins</td>
+ </tr><tr>
<td>Alpha</td>
<td>John Donoghue</td>
- </tr><tr>
<td>kudah</td>
<td>Igor Shaula</td>
+ </tr><tr>
<td>Pavel Bulochkin</td>
<td>Yosef Or Boczko</td>
- </tr><tr>
<td>Brian Griffin</td>
<td>Özgür Emir</td>
+ </tr><tr>
<td>Neomi</td>
<td>OmegaPhil</td>
- </tr><tr>
<td>SiegeLord</td>
<td>Erik</td>
+ </tr><tr>
<td>TJF</td>
<td>Mark Robinson</td>
- </tr><tr>
<td>Thomas Martitz</td>
<td>felix</td>
+ </tr><tr>
<td>Christian Walther</td>
<td>Ebben</td>
+ <td>Robert Gieseke</td>
+ <td>Mike M</td>
+ </tr><tr>
+ <td>nkmathew</td>
</tr>
</table>
<p>
@@ -452,6 +459,68 @@
</li>
</ul>
<h3>
+ <a href="http://prdownloads.sourceforge.net/scintilla/scite340.zip?download">Release 3.4.0</a>
+ </h3>
+ <ul>
+ <li>
+ Released 22 March 2014.
+ </li>
+ <li>
+ The Unicode line ends and substyles features added as provisional in 3.2.5 are now finalised.
+ There are now no provisional features.
+ </li>
+ <li>
+ Added wrap mode SC_WRAP_WHITESPACE which only wraps on whitespace, not on style changes.
+ </li>
+ <li>
+ SciTE find and replace strips can perform incremental searching and temporary highlighting of all
+ matches with the find.strip.incremental, replace.strip.incremental, and find.indicator.incremental settings.
+ </li>
+ <li>
+ SciTE default settings changed to use strips for find and replace and to draw with Direct2D and
+ DirectWrite on Windows.
+ </li>
+ <li>
+ SciTE on Windows scales image buttons on the find and replace strips to match the current system scale factor.
+ </li>
+ <li>
+ Additional assembler lexer variant As(SCLEX_AS) for Unix assembly code which uses '#' for comments and
+ ';' to separate statements.
+ </li>
+ <li>
+ Fix Coffeescript lexer for keyword style extending past end of word.
+ Also fixes styling 0...myArray.length all as a number.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1583/">Bug #1583</a>.
+ </li>
+ <li>
+ Fix crashes and other bugs in Fortran folder by removing folding of do-label constructs.
+ </li>
+ <li>
+ Deleting a whole line deletes the annotations on that line instead of the annotations on the next line.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1577/">Bug #1577</a>.
+ </li>
+ <li>
+ Changed position of tall calltips to prefer lower half of screen to cut off end instead of start.
+ </li>
+ <li>
+ Fix Qt bug where double click treated as triple click.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1575/">Bug #1575</a>.
+ </li>
+ <li>
+ On Qt, selecting an item in an autocompletion list that is not currently visible positions it at the top.
+ </li>
+ <li>
+ Fix bug on Windows when resizing autocompletion list with only short strings caused the list to move.
+ </li>
+ <li>
+ On Cocoa reduce scrollable height by one line to fix bugs with moving caret
+ up or down.
+ </li>
+ <li>
+ On Cocoa fix calltips which did not appear when they were created in an off-screen position.
+ </li>
+ </ul>
+ <h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite339.zip?download">Release 3.3.9</a>
</h3>
<ul>
diff --git a/scintilla/doc/index.html b/scintilla/doc/index.html
index d19ec15..43f09eb 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="20140131" />
+ <meta name="Date.Modified" content="20140322" />
<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.3.9<br />
- Site last modified January 31 2014</font>
+ <font color="#FFCC99" size="3"> Release version 3.4.0<br />
+ Site last modified March 22 2014</font>
</td>
<td width="20%">
&nbsp;
@@ -71,6 +71,7 @@
</tr>
</table>
<ul id="versionlist">
+ <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>
diff --git a/scintilla/include/Platform.h b/scintilla/include/Platform.h
index 1d0d321..df7728d 100644
--- a/scintilla/include/Platform.h
+++ b/scintilla/include/Platform.h
@@ -444,6 +444,16 @@ public:
static DynamicLibrary *Load(const char *modulePath);
};
+#if defined(__clang__)
+# if __has_feature(attribute_analyzer_noreturn)
+# define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn))
+# else
+# define CLANG_ANALYZER_NORETURN
+# endif
+#else
+# define CLANG_ANALYZER_NORETURN
+#endif
+
/**
* Platform class used to retrieve system wide parameters such as double click speed
* and chrome colour. Not a creatable object, more of a module with several functions.
@@ -488,7 +498,7 @@ public:
}
static void DebugPrintf(const char *format, ...);
static bool ShowAssertionPopUps(bool assertionPopUps_);
- static void Assert(const char *c, const char *file, int line);
+ static void Assert(const char *c, const char *file, int line) CLANG_ANALYZER_NORETURN;
static int Clamp(int val, int minVal, int maxVal);
};
diff --git a/scintilla/include/SciLexer.h b/scintilla/include/SciLexer.h
index 4439bb6..67b40d4 100644
--- a/scintilla/include/SciLexer.h
+++ b/scintilla/include/SciLexer.h
@@ -125,6 +125,7 @@
#define SCLEX_KVIRC 110
#define SCLEX_RUST 111
#define SCLEX_DMAP 112
+#define SCLEX_AS 113
#define SCLEX_AHK 200
#define SCLEX_AUTOMATIC 1000
#define SCE_P_DEFAULT 0
diff --git a/scintilla/include/Scintilla.h b/scintilla/include/Scintilla.h
index 4910515..0f653cd 100644
--- a/scintilla/include/Scintilla.h
+++ b/scintilla/include/Scintilla.h
@@ -475,6 +475,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_WRAP_NONE 0
#define SC_WRAP_WORD 1
#define SC_WRAP_CHAR 2
+#define SC_WRAP_WHITESPACE 3
#define SCI_SETWRAPMODE 2268
#define SCI_GETWRAPMODE 2269
#define SC_WRAPVISUALFLAG_NONE 0x0000
@@ -883,6 +884,11 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_VCHOMEDISPLAYEXTEND 2653
#define SCI_GETCARETLINEVISIBLEALWAYS 2654
#define SCI_SETCARETLINEVISIBLEALWAYS 2655
+#define SC_LINE_END_TYPE_DEFAULT 0
+#define SC_LINE_END_TYPE_UNICODE 1
+#define SCI_SETLINEENDTYPESALLOWED 2656
+#define SCI_GETLINEENDTYPESALLOWED 2657
+#define SCI_GETLINEENDTYPESACTIVE 2658
#define SCI_SETREPRESENTATION 2665
#define SCI_GETREPRESENTATION 2666
#define SCI_CLEARREPRESENTATION 2667
@@ -909,6 +915,16 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_PROPERTYTYPE 4015
#define SCI_DESCRIBEPROPERTY 4016
#define SCI_DESCRIBEKEYWORDSETS 4017
+#define SCI_GETLINEENDTYPESSUPPORTED 4018
+#define SCI_ALLOCATESUBSTYLES 4020
+#define SCI_GETSUBSTYLESSTART 4021
+#define SCI_GETSUBSTYLESLENGTH 4022
+#define SCI_GETSTYLEFROMSUBSTYLE 4027
+#define SCI_GETPRIMARYSTYLEFROMSTYLE 4028
+#define SCI_FREESUBSTYLES 4023
+#define SCI_SETIDENTIFIERS 4024
+#define SCI_DISTANCETOSECONDARYSTYLES 4025
+#define SCI_GETSUBSTYLEBASES 4026
#define SC_MOD_INSERTTEXT 0x1
#define SC_MOD_DELETETEXT 0x2
#define SC_MOD_CHANGESTYLE 0x4
@@ -992,23 +1008,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCN_HOTSPOTRELEASECLICK 2027
#define SCN_FOCUSIN 2028
#define SCN_FOCUSOUT 2029
-#ifndef SCI_DISABLE_PROVISIONAL
-#define SC_LINE_END_TYPE_DEFAULT 0
-#define SC_LINE_END_TYPE_UNICODE 1
-#define SCI_SETLINEENDTYPESALLOWED 2656
-#define SCI_GETLINEENDTYPESALLOWED 2657
-#define SCI_GETLINEENDTYPESACTIVE 2658
-#define SCI_GETLINEENDTYPESSUPPORTED 4018
-#define SCI_ALLOCATESUBSTYLES 4020
-#define SCI_GETSUBSTYLESSTART 4021
-#define SCI_GETSUBSTYLESLENGTH 4022
-#define SCI_GETSTYLEFROMSUBSTYLE 4027
-#define SCI_GETPRIMARYSTYLEFROMSTYLE 4028
-#define SCI_FREESUBSTYLES 4023
-#define SCI_SETIDENTIFIERS 4024
-#define SCI_DISTANCETOSECONDARYSTYLES 4025
-#define SCI_GETSUBSTYLEBASES 4026
-#endif
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
/* These structures are defined to be exactly the same shape as the Win32
diff --git a/scintilla/include/Scintilla.iface b/scintilla/include/Scintilla.iface
index be39985..fe6d99f 100644
--- a/scintilla/include/Scintilla.iface
+++ b/scintilla/include/Scintilla.iface
@@ -1189,6 +1189,7 @@ enu Wrap=SC_WRAP_
val SC_WRAP_NONE=0
val SC_WRAP_WORD=1
val SC_WRAP_CHAR=2
+val SC_WRAP_WHITESPACE=3
# Sets whether text is word wrapped.
set void SetWrapMode=2268(int mode,)
@@ -2343,6 +2344,22 @@ get bool GetCaretLineVisibleAlways=2654(,)
# Sets the caret line to always visible.
set void SetCaretLineVisibleAlways=2655(bool alwaysVisible,)
+# Line end types which may be used in addition to LF, CR, and CRLF
+# SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator,
+# U+2029 Paragraph Separator, and U+0085 Next Line
+enu LineEndType=SC_LINE_END_TYPE_
+val SC_LINE_END_TYPE_DEFAULT=0
+val SC_LINE_END_TYPE_UNICODE=1
+
+# Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.
+set void SetLineEndTypesAllowed=2656(int lineEndBitSet,)
+
+# Get the line end types currently allowed.
+get int GetLineEndTypesAllowed=2657(,)
+
+# Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.
+get int GetLineEndTypesActive=2658(,)
+
# Set the way a character is drawn.
set void SetRepresentation=2665(string encodedCharacter, string representation)
@@ -2420,6 +2437,38 @@ fun int DescribeProperty=4016(string name, stringresult description)
# Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
fun int DescribeKeyWordSets=4017(, stringresult descriptions)
+# Bit set of LineEndType enumertion for which line ends beyond the standard
+# LF, CR, and CRLF are supported by the lexer.
+get int GetLineEndTypesSupported=4018(,)
+
+# Allocate a set of sub styles for a particular base style, returning start of range
+fun int AllocateSubStyles=4020(int styleBase, int numberStyles)
+
+# The starting style number for the sub styles associated with a base style
+get int GetSubStylesStart=4021(int styleBase,)
+
+# The number of sub styles associated with a base style
+get int GetSubStylesLength=4022(int styleBase,)
+
+# For a sub style, return the base style, else return the argument.
+get int GetStyleFromSubStyle=4027(int subStyle,)
+
+# For a secondary style, return the primary style, else return the argument.
+get int GetPrimaryStyleFromStyle=4028(int style,)
+
+# Free allocated sub styles
+fun void FreeSubStyles=4023(,)
+
+# Set the identifiers that are shown in a particular style
+set void SetIdentifiers=4024(int style, string identifiers)
+
+# Where styles are duplicated by a feature such as active/inactive code
+# return the distance between the two types.
+get int DistanceToSecondaryStyles=4025(,)
+
+# Get the set of base styles that can be extended with sub styles
+get int GetSubStyleBases=4026(, stringresult styles)
+
# Notifications
# 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.
@@ -2609,6 +2658,7 @@ val SCLEX_STTXT=109
val SCLEX_KVIRC=110
val SCLEX_RUST=111
val SCLEX_DMAP=112
+val SCLEX_AS=113
## notepad2 custom code for the AHK lexer - start
val SCLEX_AHK=200
## notepad2 custom code for the AHK lexer - end
@@ -3201,8 +3251,9 @@ val SCE_SCRIPTOL_IDENTIFIER=12
val SCE_SCRIPTOL_TRIPLE=13
val SCE_SCRIPTOL_CLASSNAME=14
val SCE_SCRIPTOL_PREPROCESSOR=15
-# Lexical states for SCLEX_ASM
+# Lexical states for SCLEX_ASM, SCLEX_AS
lex Asm=SCLEX_ASM SCE_ASM_
+lex As=SCLEX_AS SCE_ASM_
val SCE_ASM_DEFAULT=0
val SCE_ASM_COMMENT=1
val SCE_ASM_NUMBER=2
@@ -4449,55 +4500,9 @@ evt void HotSpotReleaseClick=2027(int modifiers, int position)
evt void FocusIn=2028(void)
evt void FocusOut=2029(void)
-cat Provisional
+# There are no provisional features currently
-# Line end types which may be used in addition to LF, CR, and CRLF
-# SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator,
-# U+2029 Paragraph Separator, and U+0085 Next Line
-enu LineEndType=SC_LINE_END_TYPE_
-val SC_LINE_END_TYPE_DEFAULT=0
-val SC_LINE_END_TYPE_UNICODE=1
-
-# Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.
-set void SetLineEndTypesAllowed=2656(int lineEndBitSet,)
-
-# Get the line end types currently allowed.
-get int GetLineEndTypesAllowed=2657(,)
-
-# Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.
-get int GetLineEndTypesActive=2658(,)
-
-# Bit set of LineEndType enumertion for which line ends beyond the standard
-# LF, CR, and CRLF are supported by the lexer.
-get int GetLineEndTypesSupported=4018(,)
-
-# Allocate a set of sub styles for a particular base style, returning start of range
-fun int AllocateSubStyles=4020(int styleBase, int numberStyles)
-
-# The starting style number for the sub styles associated with a base style
-get int GetSubStylesStart=4021(int styleBase,)
-
-# The number of sub styles associated with a base style
-get int GetSubStylesLength=4022(int styleBase,)
-
-# For a sub style, return the base style, else return the argument.
-get int GetStyleFromSubStyle=4027(int subStyle,)
-
-# For a secondary style, return the primary style, else return the argument.
-get int GetPrimaryStyleFromStyle=4028(int style,)
-
-# Free allocated sub styles
-fun void FreeSubStyles=4023(,)
-
-# Set the identifiers that are shown in a particular style
-set void SetIdentifiers=4024(int style, string identifiers)
-
-# Where styles are duplicated by a feature such as active/inactive code
-# return the distance between the two types.
-get int DistanceToSecondaryStyles=4025(,)
-
-# Get the set of base styles that can be extended with sub styles
-get int GetSubStyleBases=4026(, stringresult styles)
+cat Provisional
cat Deprecated
diff --git a/scintilla/lexers/LexAsm.cxx b/scintilla/lexers/LexAsm.cxx
index 7745e11..b4fdf6c 100644
--- a/scintilla/lexers/LexAsm.cxx
+++ b/scintilla/lexers/LexAsm.cxx
@@ -150,8 +150,10 @@ class LexerAsm : public ILexer {
WordList directives4foldend;
OptionsAsm options;
OptionSetAsm osAsm;
+ int commentChar;
public:
- LexerAsm() {
+ LexerAsm(int commentChar_) {
+ commentChar = commentChar_;
}
virtual ~LexerAsm() {
}
@@ -183,7 +185,11 @@ public:
}
static ILexer *LexerFactoryAsm() {
- return new LexerAsm();
+ return new LexerAsm(';');
+ }
+
+ static ILexer *LexerFactoryAs() {
+ return new LexerAsm('#');
}
};
@@ -342,7 +348,7 @@ void SCI_METHOD LexerAsm::Lex(unsigned int startPos, int length, int initStyle,
// Determine if a new state should be entered.
if (sc.state == SCE_ASM_DEFAULT) {
- if (sc.ch == ';'){
+ if (sc.ch == commentChar){
sc.SetState(SCE_ASM_COMMENT);
} else if (IsASCII(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && IsASCII(sc.chNext) && isdigit(sc.chNext)))) {
sc.SetState(SCE_ASM_NUMBER);
@@ -457,4 +463,5 @@ void SCI_METHOD LexerAsm::Fold(unsigned int startPos, int length, int initStyle,
}
LexerModule lmAsm(SCLEX_ASM, LexerAsm::LexerFactoryAsm, "asm", asmWordListDesc);
+LexerModule lmAs(SCLEX_AS, LexerAsm::LexerFactoryAs, "as", asmWordListDesc);
diff --git a/scintilla/lexers/LexCoffeeScript.cxx b/scintilla/lexers/LexCoffeeScript.cxx
index 53d9a38..ceaaf7f 100644
--- a/scintilla/lexers/LexCoffeeScript.cxx
+++ b/scintilla/lexers/LexCoffeeScript.cxx
@@ -66,9 +66,8 @@ static bool followsReturnKeyword(StyleContext &sc, Accessor &styler) {
int pos = (int) sc.currentPos;
int currentLine = styler.GetLine(pos);
int lineStartPos = styler.LineStart(currentLine);
- char ch;
while (--pos > lineStartPos) {
- ch = styler.SafeGetCharAt(pos);
+ char ch = styler.SafeGetCharAt(pos);
if (ch != ' ' && ch != '\t') {
break;
}
@@ -185,7 +184,7 @@ static void ColouriseCoffeeScriptDoc(unsigned int startPos, int length, int init
break;
case SCE_COFFEESCRIPT_NUMBER:
// We accept almost anything because of hex. and number suffixes
- if (!setWord.Contains(sc.ch)) {
+ if (!setWord.Contains(sc.ch) || sc.Match('.', '.')) {
sc.SetState(SCE_COFFEESCRIPT_DEFAULT);
}
break;
@@ -204,6 +203,13 @@ static void ColouriseCoffeeScriptDoc(unsigned int startPos, int length, int init
sc.SetState(SCE_COFFEESCRIPT_DEFAULT);
}
break;
+ case SCE_COFFEESCRIPT_WORD:
+ case SCE_COFFEESCRIPT_WORD2:
+ case SCE_COFFEESCRIPT_GLOBALCLASS:
+ if (!setWord.Contains(sc.ch)) {
+ sc.SetState(SCE_COFFEESCRIPT_DEFAULT);
+ }
+ break;
case SCE_COFFEESCRIPT_PREPROCESSOR:
if (sc.atLineStart && !continuationLine) {
sc.SetState(SCE_COFFEESCRIPT_DEFAULT);
diff --git a/scintilla/lexers/LexFortran.cxx b/scintilla/lexers/LexFortran.cxx
index 6d6b25e..d6da177 100644
--- a/scintilla/lexers/LexFortran.cxx
+++ b/scintilla/lexers/LexFortran.cxx
@@ -316,22 +316,17 @@ static void FoldFortranDoc(unsigned int startPos, int length, int initStyle,
isPrevLine = false;
}
char chNext = styler[startPos];
- char chNextNonBlank;
int styleNext = styler.StyleAt(startPos);
int style = initStyle;
int levelDeltaNext = 0;
/***************************************/
int lastStart = 0;
char prevWord[32] = "";
- char Label[6] = "";
- // Variables for do label folding.
- static int doLabels[100];
- static int posLabel=-1;
/***************************************/
for (unsigned int i = startPos; i < endPos; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
- chNextNonBlank = chNext;
+ char chNextNonBlank = chNext;
bool nextEOL = false;
if (IsALineEnd(chNextNonBlank)) {
nextEOL = true;
@@ -427,7 +422,8 @@ static void FoldFortranDoc(unsigned int startPos, int length, int initStyle,
}
}
} else {
- levelDeltaNext += classifyFoldPointFortran(s, prevWord, chNextNonBlank);
+ int wordLevelDelta = classifyFoldPointFortran(s, prevWord, chNextNonBlank);
+ levelDeltaNext += wordLevelDelta;
if (((strcmp(s, "else") == 0) && (nextEOL || chNextNonBlank == '!')) ||
(strcmp(prevWord, "else") == 0 && strcmp(s, "where") == 0) || strcmp(s, "elsewhere") == 0) {
if (!isPrevLine) {
@@ -453,38 +449,16 @@ static void FoldFortranDoc(unsigned int startPos, int length, int initStyle,
levelDeltaNext -= 2;
}
- // Store the do Labels into array
+ // There are multiple forms of "do" loop. The older form with a label "do 100 i=1,10" would require matching
+ // labels to ensure the folding level does not decrease too far when labels are used for other purposes.
+ // Since this is difficult, do-label constructs are not folded.
if (strcmp(s, "do") == 0 && IsADigit(chNextNonBlank)) {
- unsigned int k = 0;
- for (i=j; (i<j+5 && i<endPos); i++) {
- ch = styler.SafeGetCharAt(i);
- if (IsADigit(ch))
- Label[k++] = ch;
- else
- break;
- }
- Label[k] = '\0';
- posLabel ++;
- doLabels[posLabel] = atoi(Label);
+ // Remove delta for do-label
+ levelDeltaNext -= wordLevelDelta;
}
}
strcpy(prevWord, s);
}
- } else if (style == SCE_F_LABEL) {
- if(IsADigit(ch) && !IsADigit(chNext)) {
- for(j = 0; ( j < 5 ) && ( j < i-lastStart+1 ); j++) {
- ch = styler.SafeGetCharAt(lastStart + j);
- if (IsADigit(ch) && styler.StyleAt(lastStart+j) == SCE_F_LABEL)
- Label[j] = ch;
- else
- break;
- }
- Label[j] = '\0';
- while (doLabels[posLabel] == atoi(Label) && posLabel > -1) {
- levelCurrent--;
- posLabel--;
- }
- }
}
if (atEOL) {
int lev = levelCurrent;
diff --git a/scintilla/lexers/LexMarkdown.cxx b/scintilla/lexers/LexMarkdown.cxx
index 049f647..23a2e60 100644
--- a/scintilla/lexers/LexMarkdown.cxx
+++ b/scintilla/lexers/LexMarkdown.cxx
@@ -118,10 +118,11 @@ static bool AtTermStart(StyleContext &sc) {
}
static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
- int c, count = 1;
+ int count = 1;
unsigned int i = 0;
- while (++i) {
- c = sc.GetRelative(i);
+ for (;;) {
+ ++i;
+ int c = sc.GetRelative(i);
if (c == sc.ch)
++count;
// hit a terminating character
@@ -140,7 +141,6 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
}
}
}
- return false;
}
static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle,
diff --git a/scintilla/lexers/LexTxt2tags.cxx b/scintilla/lexers/LexTxt2tags.cxx
index cce68b4..42d372b 100644
--- a/scintilla/lexers/LexTxt2tags.cxx
+++ b/scintilla/lexers/LexTxt2tags.cxx
@@ -78,10 +78,11 @@ static bool HasPrevLineContent(StyleContext &sc) {
// Separator line
static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
- int c, count = 1;
+ int count = 1;
unsigned int i = 0;
- while (++i) {
- c = sc.GetRelative(i);
+ for (;;) {
+ ++i;
+ int c = sc.GetRelative(i);
if (c == sc.ch)
++count;
// hit a terminating character
@@ -100,7 +101,6 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
}
}
}
- return false;
}
static void ColorizeTxt2tagsDoc(unsigned int startPos, int length, int initStyle,
diff --git a/scintilla/scripts/HFacer.py b/scintilla/scripts/HFacer.py
index 819181f..ed36df4 100644
--- a/scintilla/scripts/HFacer.py
+++ b/scintilla/scripts/HFacer.py
@@ -22,11 +22,13 @@ def printLexHFile(f):
def printHFile(f):
out = []
previousCategory = ""
+ anyProvisional = False
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["Category"] == "Provisional" and previousCategory != "Provisional":
out.append("#ifndef SCI_DISABLE_PROVISIONAL")
+ anyProvisional = True
previousCategory = v["Category"]
if v["FeatureType"] in ["fun", "get", "set"]:
featureDefineName = "SCI_" + name.upper()
@@ -37,7 +39,8 @@ def printHFile(f):
elif v["FeatureType"] in ["val"]:
if not ("SCE_" in name or "SCLEX_" in name):
out.append("#define " + name + " " + v["Value"])
- out.append("#endif")
+ if anyProvisional:
+ out.append("#endif")
return out
def RegenerateAll(root, showMaxID):
diff --git a/scintilla/scripts/ScintillaData.py b/scintilla/scripts/ScintillaData.py
index 1c999a1..bb21c22 100644
--- a/scintilla/scripts/ScintillaData.py
+++ b/scintilla/scripts/ScintillaData.py
@@ -115,6 +115,30 @@ def FindPropertyDocumentation(lexFile):
del documents[name]
return documents
+def FindCredits(historyFile):
+ credits = []
+ stage = 0
+ with open(historyFile) as f:
+ for l in f.readlines():
+ l = l.strip()
+ if stage == 0 and l == "<table>":
+ stage = 1
+ elif stage == 1 and l == "</table>":
+ stage = 2
+ if stage == 1 and l.startswith("<td>"):
+ credit = l[4:-5]
+ if "<a" in l:
+ title, a, rest = credit.partition("<a href=")
+ urlplus, bracket, end = rest.partition(">")
+ name = end.split("<")[0]
+ url = urlplus[1:-1]
+ credit = title.strip()
+ if credit:
+ credit += " "
+ credit += name + " " + url
+ credits.append(credit.decode("utf-8"))
+ return credits
+
def ciCompare(a,b):
return cmp(a.lower(), b.lower())
@@ -173,6 +197,8 @@ class ScintillaData:
self.lexerProperties = list(lexerProperties)
SortListInsensitive(self.lexerProperties)
+ self.credits = FindCredits(scintillaRoot + "doc/ScintillaHistory.html")
+
def printWrapped(text):
print(textwrap.fill(text, subsequent_indent=" "))
@@ -191,3 +217,6 @@ if __name__=="__main__":
print(" " + k)
print(textwrap.fill(sci.propertyDocuments[k], initial_indent=" ",
subsequent_indent=" "))
+ print("Credits:")
+ for c in sci.credits:
+ print(" " + c.encode("utf-8"))
diff --git a/scintilla/src/Catalogue.cxx b/scintilla/src/Catalogue.cxx
index c6d7eb6..e4c5ad0 100644
--- a/scintilla/src/Catalogue.cxx
+++ b/scintilla/src/Catalogue.cxx
@@ -81,6 +81,7 @@ int Scintilla_LinkLexers() {
//LINK_LEXER(lmAda);
LINK_LEXER(lmAHK);
//LINK_LEXER(lmAPDL);
+ //LINK_LEXER(lmAs);
LINK_LEXER(lmAsm);
//LINK_LEXER(lmAsn1);
//LINK_LEXER(lmASY);
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx
index 683ec19..5dab852 100644
--- a/scintilla/src/Editor.cxx
+++ b/scintilla/src/Editor.cxx
@@ -477,36 +477,17 @@ Point Editor::LocationFromPosition(SelectionPosition pos) {
RefreshStyleData();
if (pos.Position() == INVALID_POSITION)
return pt;
- int line = pdoc->LineFromPosition(pos.Position());
- int lineVisible = cs.DisplayFromDoc(line);
+ const int line = pdoc->LineFromPosition(pos.Position());
+ const int lineVisible = cs.DisplayFromDoc(line);
//Platform::DebugPrintf("line=%d\n", line);
AutoSurface surface(this);
AutoLineLayout ll(llc, RetrieveLineLayout(line));
if (surface && ll) {
- // -1 because of adding in for visible lines in following loop.
- pt.y = (lineVisible - topLine - 1) * vs.lineHeight;
- pt.x = 0;
- unsigned int posLineStart = pdoc->LineStart(line);
+ const int posLineStart = pdoc->LineStart(line);
LayoutLine(line, surface, vs, ll, wrapWidth);
- int posInLine = pos.Position() - posLineStart;
- // In case of very long line put x at arbitrary large position
- if (posInLine > ll->maxLineLength) {
- pt.x = ll->positions[ll->maxLineLength] - ll->positions[ll->LineStart(ll->lines)];
- }
-
- for (int subLine = 0; subLine < ll->lines; subLine++) {
- if ((posInLine >= ll->LineStart(subLine)) && (posInLine <= ll->LineStart(subLine + 1))) {
- pt.x = ll->positions[posInLine] - ll->positions[ll->LineStart(subLine)];
- if (ll->wrapIndent != 0) {
- int lineStart = ll->LineStart(subLine);
- if (lineStart != 0) // Wrapped
- pt.x += ll->wrapIndent;
- }
- }
- if (posInLine >= ll->LineStart(subLine)) {
- pt.y += vs.lineHeight;
- }
- }
+ const int posInLine = pos.Position() - posLineStart;
+ pt = ll->PointFromPosition(posInLine, vs.lineHeight);
+ pt.y += (lineVisible - topLine) * vs.lineHeight;
pt.x += vs.textStart - xOffset;
}
pt.x += pos.VirtualSpace() * vs.styles[ll->EndLineStyle()].spaceWidth;
@@ -558,58 +539,44 @@ SelectionPosition Editor::SPositionFromLocation(Point pt, bool canReturnInvalid,
int visibleLine = floor(pt.y / vs.lineHeight);
if (!canReturnInvalid && (visibleLine < 0))
visibleLine = 0;
- int lineDoc = cs.DocFromDisplay(visibleLine);
+ const int lineDoc = cs.DocFromDisplay(visibleLine);
if (canReturnInvalid && (lineDoc < 0))
return SelectionPosition(INVALID_POSITION);
if (lineDoc >= pdoc->LinesTotal())
return SelectionPosition(canReturnInvalid ? INVALID_POSITION : pdoc->Length());
- unsigned int posLineStart = pdoc->LineStart(lineDoc);
- SelectionPosition retVal(canReturnInvalid ? INVALID_POSITION : static_cast<int>(posLineStart));
+ const int posLineStart = pdoc->LineStart(lineDoc);
AutoSurface surface(this);
AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
if (surface && ll) {
LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
- int lineStartSet = cs.DisplayFromDoc(lineDoc);
- int subLine = visibleLine - lineStartSet;
+ const int lineStartSet = cs.DisplayFromDoc(lineDoc);
+ const int subLine = visibleLine - lineStartSet;
if (subLine < ll->lines) {
- int lineStart = ll->LineStart(subLine);
- int lineEnd = ll->LineLastVisible(subLine);
- XYPOSITION subLineStart = ll->positions[lineStart];
-
- if (ll->wrapIndent != 0) {
- if (lineStart != 0) // Wrapped
- pt.x -= ll->wrapIndent;
- }
- int i = ll->FindBefore(pt.x + subLineStart, lineStart, lineEnd);
- while (i < lineEnd) {
- if (charPosition) {
- if ((pt.x + subLineStart) < (ll->positions[i + 1])) {
- return SelectionPosition(pdoc->MovePositionOutsideChar(i + posLineStart, 1));
- }
- } else {
- if ((pt.x + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) {
- return SelectionPosition(pdoc->MovePositionOutsideChar(i + posLineStart, 1));
- }
- }
- i++;
+ const Range rangeSubLine = ll->SubLineRange(subLine);
+ const XYPOSITION subLineStart = ll->positions[rangeSubLine.start];
+ if (subLine > 0) // Wrapped
+ pt.x -= ll->wrapIndent;
+ const int positionInLine = ll->FindPositionFromX(pt.x + subLineStart, rangeSubLine, charPosition);
+ if (positionInLine < rangeSubLine.end) {
+ return SelectionPosition(pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1));
}
if (virtualSpace) {
const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth;
- int spaceOffset = (pt.x + subLineStart - ll->positions[lineEnd] + spaceWidth / 2) /
+ const int spaceOffset = (pt.x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) /
spaceWidth;
- return SelectionPosition(lineEnd + posLineStart, spaceOffset);
+ return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset);
} else if (canReturnInvalid) {
- if (pt.x < (ll->positions[lineEnd] - subLineStart)) {
- return SelectionPosition(pdoc->MovePositionOutsideChar(lineEnd + posLineStart, 1));
+ if (pt.x < (ll->positions[rangeSubLine.end] - subLineStart)) {
+ return SelectionPosition(pdoc->MovePositionOutsideChar(rangeSubLine.end + posLineStart, 1));
}
} else {
- return SelectionPosition(lineEnd + posLineStart);
+ return SelectionPosition(rangeSubLine.end + posLineStart);
}
}
if (!canReturnInvalid)
return SelectionPosition(ll->numCharsInLine + posLineStart);
}
- return retVal;
+ return SelectionPosition(canReturnInvalid ? INVALID_POSITION : posLineStart);
}
int Editor::PositionFromLocation(Point pt, bool canReturnInvalid, bool charPosition) {
@@ -619,6 +586,7 @@ int Editor::PositionFromLocation(Point pt, bool canReturnInvalid, bool charPosit
/**
* Find the document position corresponding to an x coordinate on a particular document line.
* Ensure is between whole characters when document is in multi-byte or UTF-8 mode.
+ * This method is used for rectangular selections and does not work on wrapped lines.
*/
SelectionPosition Editor::SPositionFromLineX(int lineDoc, int x) {
RefreshStyleData();
@@ -627,33 +595,20 @@ SelectionPosition Editor::SPositionFromLineX(int lineDoc, int x) {
//Platform::DebugPrintf("Position of (%d,%d) line = %d top=%d\n", pt.x, pt.y, line, topLine);
AutoSurface surface(this);
AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc));
- int retVal = 0;
if (surface && ll) {
- unsigned int posLineStart = pdoc->LineStart(lineDoc);
+ const int posLineStart = pdoc->LineStart(lineDoc);
LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
- int subLine = 0;
- int lineStart = ll->LineStart(subLine);
- int lineEnd = ll->LineLastVisible(subLine);
- XYPOSITION subLineStart = ll->positions[lineStart];
- XYPOSITION newX = x;
-
- if (ll->wrapIndent != 0) {
- if (lineStart != 0) // Wrapped
- newX -= ll->wrapIndent;
- }
- int i = ll->FindBefore(newX + subLineStart, lineStart, lineEnd);
- while (i < lineEnd) {
- if ((newX + subLineStart) < ((ll->positions[i] + ll->positions[i + 1]) / 2)) {
- retVal = pdoc->MovePositionOutsideChar(i + posLineStart, 1);
- return SelectionPosition(retVal);
- }
- i++;
+ const Range rangeSubLine = ll->SubLineRange(0);
+ const XYPOSITION subLineStart = ll->positions[rangeSubLine.start];
+ const int positionInLine = ll->FindPositionFromX(x + subLineStart, rangeSubLine, false);
+ if (positionInLine < rangeSubLine.end) {
+ return SelectionPosition(pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1));
}
const XYPOSITION spaceWidth = vs.styles[ll->EndLineStyle()].spaceWidth;
- int spaceOffset = (newX + subLineStart - ll->positions[lineEnd] + spaceWidth / 2) / spaceWidth;
- return SelectionPosition(lineEnd + posLineStart, spaceOffset);
+ const int spaceOffset = (x + subLineStart - ll->positions[rangeSubLine.end] + spaceWidth / 2) / spaceWidth;
+ return SelectionPosition(rangeSubLine.end + posLineStart, spaceOffset);
}
- return SelectionPosition(retVal);
+ return SelectionPosition(0);
}
int Editor::PositionFromLineX(int lineDoc, int x) {
@@ -1279,7 +1234,7 @@ slop | strict | jumps | even | Caret can go to the margin | When
1 | 1 | 1 | 1 | No, kept out of UZ | moved to put caret at 3UZ of the margin
*/
-Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange range, const XYScrollOptions options) {
+Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &range, const XYScrollOptions options) {
PRectangle rcClient = GetTextRectangle();
Point pt = LocationFromPosition(range.caret);
Point ptAnchor = LocationFromPosition(range.anchor);
@@ -2400,7 +2355,7 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou
- posLineStart;
p = pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart;
continue;
- } else if (ll->styles[p] != ll->styles[p - 1]) {
+ } else if ((vstyle.wrapState == eWrapWord) && (ll->styles[p] != ll->styles[p - 1])) {
lastGoodBreak = p;
} else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) {
lastGoodBreak = p;
diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h
index 6c25c3b..98327dc 100644
--- a/scintilla/src/Editor.h
+++ b/scintilla/src/Editor.h
@@ -412,7 +412,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
xysVertical=0x2,
xysHorizontal=0x4,
xysDefault=xysUseMargin|xysVertical|xysHorizontal};
- XYScrollPosition XYScrollToMakeVisible(const SelectionRange range, const XYScrollOptions options);
+ XYScrollPosition XYScrollToMakeVisible(const SelectionRange &range, const XYScrollOptions options);
void SetXYScroll(XYScrollPosition newXY);
void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true);
void ScrollRange(SelectionRange range);
@@ -437,12 +437,12 @@ protected: // ScintillaBase subclass needs access to much of Editor
ColourDesired SelectionBackground(ViewStyle &vsDraw, bool main) const;
ColourDesired TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourDesired background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) const;
void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight);
- void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour);
+ static void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour);
void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll,
int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart,
bool overrideBackground, ColourDesired background,
bool drawWrapMark, ColourDesired wrapColour);
- void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, ViewStyle &vsDraw,
+ static void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, ViewStyle &vsDraw,
int xStart, PRectangle rcLine, LineLayout *ll, int subLine);
void DrawIndicators(Surface *surface, ViewStyle &vsDraw, int line, int xStart,
PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under);
diff --git a/scintilla/src/PerLine.cxx b/scintilla/src/PerLine.cxx
index 8db14aa..27257cd 100644
--- a/scintilla/src/PerLine.cxx
+++ b/scintilla/src/PerLine.cxx
@@ -370,9 +370,9 @@ void LineAnnotation::InsertLine(int line) {
}
void LineAnnotation::RemoveLine(int line) {
- if (annotations.Length() && (line < annotations.Length())) {
- delete []annotations[line];
- annotations.Delete(line);
+ if (annotations.Length() && (line > 0) && (line <= annotations.Length())) {
+ delete []annotations[line-1];
+ annotations.Delete(line-1);
}
}
diff --git a/scintilla/src/PositionCache.cxx b/scintilla/src/PositionCache.cxx
index 3db5a56..5326987 100644
--- a/scintilla/src/PositionCache.cxx
+++ b/scintilla/src/PositionCache.cxx
@@ -43,11 +43,6 @@
using namespace Scintilla;
#endif
-static inline bool IsControlCharacter(int ch) {
- // iscntrl returns true for lots of chars > 127 which are displayable
- return ch >= 0 && ch < ' ';
-}
-
LineLayout::LineLayout(int maxLineLength_) :
lineStarts(0),
lenLineStarts(0),
@@ -132,6 +127,10 @@ int LineLayout::LineLastVisible(int line) const {
}
}
+Range LineLayout::SubLineRange(int subLine) const {
+ return Range(LineStart(subLine), LineLastVisible(subLine));
+}
+
bool LineLayout::InLine(int offset, int line) const {
return ((offset >= LineStart(line)) && (offset < LineStart(line + 1))) ||
((offset == numCharsInLine) && (line == (lines-1)));
@@ -205,6 +204,46 @@ int LineLayout::FindBefore(XYPOSITION x, int lower, int upper) const {
return lower;
}
+
+int LineLayout::FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const {
+ int pos = FindBefore(x, range.start, range.end);
+ while (pos < range.end) {
+ if (charPosition) {
+ if (x < (positions[pos + 1])) {
+ return pos;
+ }
+ } else {
+ if (x < ((positions[pos] + positions[pos + 1]) / 2)) {
+ return pos;
+ }
+ }
+ pos++;
+ }
+ return range.end;
+}
+
+Point LineLayout::PointFromPosition(int posInLine, int lineHeight) const {
+ Point pt;
+ // In case of very long line put x at arbitrary large position
+ if (posInLine > maxLineLength) {
+ pt.x = positions[maxLineLength] - positions[LineStart(lines)];
+ }
+
+ for (int subLine = 0; subLine < lines; subLine++) {
+ const Range rangeSubLine = SubLineRange(subLine);
+ if (posInLine >= rangeSubLine.start) {
+ pt.y = subLine*lineHeight;
+ if (posInLine <= rangeSubLine.end) {
+ pt.x = positions[posInLine] - positions[rangeSubLine.start];
+ if (rangeSubLine.start != 0) // Wrapped lines may be indented
+ pt.x += wrapIndent;
+ break;
+ }
+ }
+ }
+ return pt;
+}
+
int LineLayout::EndLineStyle() const {
return styles[numCharsBeforeEOL > 0 ? numCharsBeforeEOL-1 : 0];
}
diff --git a/scintilla/src/PositionCache.h b/scintilla/src/PositionCache.h
index 9d42229..5739d45 100644
--- a/scintilla/src/PositionCache.h
+++ b/scintilla/src/PositionCache.h
@@ -60,12 +60,15 @@ public:
void Invalidate(validLevel validity_);
int LineStart(int line) const;
int LineLastVisible(int line) const;
+ Range SubLineRange(int line) const;
bool InLine(int offset, int line) const;
void SetLineStart(int line, int start);
void SetBracesHighlight(Range rangeLine, Position braces[],
char bracesMatchStyle, int xHighlight, bool ignoreStyle);
void RestoreBracesHighlight(Range rangeLine, Position braces[], bool ignoreStyle);
int FindBefore(XYPOSITION x, int lower, int upper) const;
+ int FindPositionFromX(XYPOSITION x, Range range, bool charPosition) const;
+ Point PointFromPosition(int posInLine, int lineHeight) const;
int EndLineStyle() const;
};
diff --git a/scintilla/src/ScintillaBase.cxx b/scintilla/src/ScintillaBase.cxx
index d05a6ee..da0bb58 100644
--- a/scintilla/src/ScintillaBase.cxx
+++ b/scintilla/src/ScintillaBase.cxx
@@ -417,16 +417,16 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) {
// space
PRectangle rcClient = GetClientRectangle();
int offset = vs.lineHeight + rc.Height();
- // adjust so it displays below the text.
- if (rc.top < rcClient.top) {
- rc.top += offset;
- rc.bottom += offset;
- }
// adjust so it displays above the text.
if (rc.bottom > rcClient.bottom) {
rc.top -= offset;
rc.bottom -= offset;
}
+ // adjust so it displays below the text.
+ if (rc.top < rcClient.top) {
+ rc.top += offset;
+ rc.bottom += offset;
+ }
// Now display the window.
CreateCallTipWindow(rc);
ct.wCallTip.SetPositionRelative(rc, wMain);
diff --git a/scintilla/src/ViewStyle.cxx b/scintilla/src/ViewStyle.cxx
index 7571d42..8dfa614 100644
--- a/scintilla/src/ViewStyle.cxx
+++ b/scintilla/src/ViewStyle.cxx
@@ -310,9 +310,9 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) {
styles[i].extraFontFlag = extraFontFlag;
}
- CreateFont(styles[STYLE_DEFAULT]);
+ CreateAndAddFont(styles[STYLE_DEFAULT]);
for (unsigned int j=0; j<styles.size(); j++) {
- CreateFont(styles[j]);
+ CreateAndAddFont(styles[j]);
}
for (FontMap::iterator it = fonts.begin(); it != fonts.end(); ++it) {
@@ -450,6 +450,9 @@ bool ViewStyle::SetWrapState(int wrapState_) {
case SC_WRAP_CHAR:
wrapStateWanted = eWrapChar;
break;
+ case SC_WRAP_WHITESPACE:
+ wrapStateWanted = eWrapWhitespace;
+ break;
default:
wrapStateWanted = eWrapNone;
break;
@@ -495,7 +498,7 @@ void ViewStyle::AllocStyles(size_t sizeNew) {
}
}
-void ViewStyle::CreateFont(const FontSpecification &fs) {
+void ViewStyle::CreateAndAddFont(const FontSpecification &fs) {
if (fs.fontName) {
FontMap::iterator it = fonts.find(fs);
if (it == fonts.end()) {
diff --git a/scintilla/src/ViewStyle.h b/scintilla/src/ViewStyle.h
index 3384f11..21d10b7 100644
--- a/scintilla/src/ViewStyle.h
+++ b/scintilla/src/ViewStyle.h
@@ -56,7 +56,7 @@ enum WhiteSpaceVisibility {wsInvisible=0, wsVisibleAlways=1, wsVisibleAfterInden
typedef std::map<FontSpecification, FontRealised *> FontMap;
-enum WrapMode { eWrapNone, eWrapWord, eWrapChar };
+enum WrapMode { eWrapNone, eWrapWord, eWrapChar, eWrapWhitespace };
class ColourOptional : public ColourDesired {
public:
@@ -178,7 +178,7 @@ public:
private:
void AllocStyles(size_t sizeNew);
- void CreateFont(const FontSpecification &fs);
+ void CreateAndAddFont(const FontSpecification &fs);
FontRealised *Find(const FontSpecification &fs);
void FindMaxAscentDescent();
// Private so can only be copied through copy constructor which ensures font names initialised correctly
diff --git a/scintilla/version.txt b/scintilla/version.txt
index 8e20267..ecdd82e 100644
--- a/scintilla/version.txt
+++ b/scintilla/version.txt
@@ -1 +1 @@
-339
+340
diff --git a/scintilla/win32/PlatWin.cxx b/scintilla/win32/PlatWin.cxx
index 8f3769d..985b870 100644
--- a/scintilla/win32/PlatWin.cxx
+++ b/scintilla/win32/PlatWin.cxx
@@ -2532,8 +2532,9 @@ POINT ListBoxX::MinTrackSize() const {
POINT ListBoxX::MaxTrackSize() const {
PRectangle rc(0, 0,
+ Platform::Maximum(MinClientWidth(),
maxCharWidth * maxItemCharacters + TextInset.x * 2 +
- TextOffset() + ::GetSystemMetrics(SM_CXVSCROLL),
+ TextOffset() + ::GetSystemMetrics(SM_CXVSCROLL)),
ItemHeight() * lti.Count());
AdjustWindowRect(&rc);
POINT ret = {static_cast<LONG>(rc.Width()), static_cast<LONG>(rc.Height())};
diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx
index c7c038d..2fb6160 100644
--- a/scintilla/win32/ScintillaWin.cxx
+++ b/scintilla/win32/ScintillaWin.cxx
@@ -131,10 +131,9 @@ class FormatEnumerator {
public:
VFunction **vtbl;
int ref;
- int pos;
- CLIPFORMAT formats[2];
- int formatsLen;
- FormatEnumerator(int pos_, CLIPFORMAT formats_[], int formatsLen_);
+ unsigned int pos;
+ std::vector<CLIPFORMAT> formats;
+ FormatEnumerator(int pos_, CLIPFORMAT formats_[], size_t formatsLen_);
};
/**
@@ -1811,16 +1810,15 @@ STDMETHODIMP_(ULONG)FormatEnumerator_Release(FormatEnumerator *fe) {
}
/// Implement IEnumFORMATETC
STDMETHODIMP FormatEnumerator_Next(FormatEnumerator *fe, ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched) {
- //Platform::DebugPrintf("EFE Next %d %d", fe->pos, celt);
if (rgelt == NULL) return E_POINTER;
- // We only support one format, so this is simple.
unsigned int putPos = 0;
- while ((fe->pos < fe->formatsLen) && (putPos < celt)) {
+ while ((fe->pos < fe->formats.size()) && (putPos < celt)) {
rgelt->cfFormat = fe->formats[fe->pos];
rgelt->ptd = 0;
rgelt->dwAspect = DVASPECT_CONTENT;
rgelt->lindex = -1;
rgelt->tymed = TYMED_HGLOBAL;
+ rgelt++;
fe->pos++;
putPos++;
}
@@ -1839,7 +1837,7 @@ STDMETHODIMP FormatEnumerator_Reset(FormatEnumerator *fe) {
STDMETHODIMP FormatEnumerator_Clone(FormatEnumerator *fe, IEnumFORMATETC **ppenum) {
FormatEnumerator *pfe;
try {
- pfe = new FormatEnumerator(fe->pos, fe->formats, fe->formatsLen);
+ pfe = new FormatEnumerator(fe->pos, &fe->formats[0], fe->formats.size());
} catch (...) {
return E_OUTOFMEMORY;
}
@@ -1857,13 +1855,11 @@ static VFunction *vtFormatEnumerator[] = {
(VFunction *)(FormatEnumerator_Clone)
};
-FormatEnumerator::FormatEnumerator(int pos_, CLIPFORMAT formats_[], int formatsLen_) {
+FormatEnumerator::FormatEnumerator(int pos_, CLIPFORMAT formats_[], size_t formatsLen_) {
vtbl = vtFormatEnumerator;
ref = 0; // First QI adds first reference...
pos = pos_;
- formatsLen = formatsLen_;
- for (int i=0; i<formatsLen; i++)
- formats[i] = formats_[i];
+ formats.insert(formats.begin(), formats_, formats_+formatsLen_);
}
/// Implement IUnknown
@@ -1978,10 +1974,10 @@ STDMETHODIMP DataObject_EnumFormatEtc(DataObject *pd, DWORD dwDirection, IEnumFO
FormatEnumerator *pfe;
if (pd->sci->IsUnicodeMode()) {
CLIPFORMAT formats[] = {CF_UNICODETEXT, CF_TEXT};
- pfe = new FormatEnumerator(0, formats, 2);
+ pfe = new FormatEnumerator(0, formats, ELEMENTS(formats));
} else {
CLIPFORMAT formats[] = {CF_TEXT};
- pfe = new FormatEnumerator(0, formats, 1);
+ pfe = new FormatEnumerator(0, formats, ELEMENTS(formats));
}
return FormatEnumerator_QueryInterface(pfe, IID_IEnumFORMATETC,
reinterpret_cast<void **>(ppEnum));