diff options
author | XhmikosR <xhmikosr@gmail.com> | 2016-05-03 19:02:55 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2016-05-03 19:02:55 +0300 |
commit | 28eead0d75876ffdd89ef0d735203ecf8ed3efc0 (patch) | |
tree | b1ff4c1fdf5220c1f14eb22dc171053a18311a59 | |
parent | 68b11903fc662cd538ed2324585e50c508cd4014 (diff) | |
download | notepad2-mod-28eead0d75876ffdd89ef0d735203ecf8ed3efc0.zip notepad2-mod-28eead0d75876ffdd89ef0d735203ecf8ed3efc0.tar.gz notepad2-mod-28eead0d75876ffdd89ef0d735203ecf8ed3efc0.tar.bz2 |
Update Scintilla to v3.6.5 (HG 84a9583).
-rw-r--r-- | scintilla/doc/SciCoding.html | 3 | ||||
-rw-r--r-- | scintilla/doc/ScintillaDoc.html | 42 | ||||
-rw-r--r-- | scintilla/doc/ScintillaDownload.html | 10 | ||||
-rw-r--r-- | scintilla/doc/ScintillaHistory.html | 53 | ||||
-rw-r--r-- | scintilla/doc/ScintillaRelated.html | 2 | ||||
-rw-r--r-- | scintilla/doc/index.html | 7 | ||||
-rw-r--r-- | scintilla/include/Scintilla.iface | 2 | ||||
-rw-r--r-- | scintilla/lexers/LexCPP.cxx | 3 | ||||
-rw-r--r-- | scintilla/lexers/LexRust.cxx | 2 | ||||
-rw-r--r-- | scintilla/lexlib/Accessor.cxx | 4 | ||||
-rw-r--r-- | scintilla/lexlib/WordList.cxx | 4 | ||||
-rw-r--r-- | scintilla/scripts/HeaderOrder.txt | 12 | ||||
-rw-r--r-- | scintilla/src/Document.cxx | 10 | ||||
-rw-r--r-- | scintilla/src/EditView.cxx | 2 | ||||
-rw-r--r-- | scintilla/src/Editor.cxx | 7 | ||||
-rw-r--r-- | scintilla/src/Editor.h | 2 | ||||
-rw-r--r-- | scintilla/src/KeyMap.h | 1 | ||||
-rw-r--r-- | scintilla/src/RESearch.h | 2 | ||||
-rw-r--r-- | scintilla/version.txt | 2 | ||||
-rw-r--r-- | scintilla/win32/PlatWin.cxx | 11 | ||||
-rw-r--r-- | scintilla/win32/ScintillaWin.cxx | 8 |
21 files changed, 133 insertions, 56 deletions
diff --git a/scintilla/doc/SciCoding.html b/scintilla/doc/SciCoding.html index f2c2624..a487031 100644 --- a/scintilla/doc/SciCoding.html +++ b/scintilla/doc/SciCoding.html @@ -145,8 +145,7 @@ <p>
Do not use old C style casts like (char *)s. Instead use the most strict form of C++
cast possible like const_cast<char *>(s). Use static_cast and const_cast
- where possible rather than reinterpret_cast. Because the code is compiled with
- run-time type information turned off, dynamic_cast will not work.
+ where possible rather than reinterpret_cast.
</p>
<p>
The benefit to using the new style casts is that they explicitly detail what evil is
diff --git a/scintilla/doc/ScintillaDoc.html b/scintilla/doc/ScintillaDoc.html index b1b550f..5edf0ca 100644 --- a/scintilla/doc/ScintillaDoc.html +++ b/scintilla/doc/ScintillaDoc.html @@ -623,8 +623,9 @@ struct Sci_TextRange { <p> The base regular expression support is limited and should only be used for simple cases and initial development. - <span class="provisional">When using a C++11 compliant compiler and runtime, it may be possible to use the - runtime's implementation of <regex> by compiling Scintilla with <code>CXX11_REGEX</code> defined.</span> + The C++ runtime <regex> library may be used by setting the <code>SCFIND_CXX11REGEX</code> search flag. + When using an older C++ compiler that does not support C++11, this may be turned off by + compiling Scintilla with <code>NO_CXX11_REGEX</code> defined. A different regular expression library can be <a class="jump" href="#AlternativeRegEx">integrated into Scintilla</a> or can be called from the container using direct access to the buffer contents through @@ -743,29 +744,32 @@ struct Sci_TextRange { <tr> <td><code>SCFIND_REGEXP</code></td> - <td>The search string should be interpreted as a regular expression.</td> + <td>The search string should be interpreted as a regular expression. + Uses Scintilla's base implementation unless combined with <code>SCFIND_CXX11REGEX</code>.</td> </tr> <tr> <td><code>SCFIND_POSIX</code></td> <td>Treat regular expression in a more POSIX compatible manner - by interpreting bare ( and ) for tagged sections rather than \( and \).</td> + by interpreting bare ( and ) for tagged sections rather than \( and \). + Has no effect when <code>SCFIND_CXX11REGEX</code> is set.</td> </tr> - <tr class="provisional"> + <tr> <td><code>SCFIND_CXX11REGEX</code></td> - <td>When compiled with <code>CXX11_REGEX</code> this flag - may be set to use <regex> instead of Scintilla's basic regular expressions. - If the regular expression is invalid then -1 is returned and status is set to - <code>SC_STATUS_WARN_REGEX</code>. - The ECMAScript flag is set on the regex object and UTF-8 documents will exhibit Unicode-compliant - behaviour. For MSVC, where wchar_t is 16-bits, the reular expression ".." will match a single - astral-plane character. There may be other differences between compilers.</td> + <td>This flag may be set to use C++11 <regex> instead of Scintilla's basic regular expressions. + If the regular expression is invalid then -1 is returned and status is set to + <code>SC_STATUS_WARN_REGEX</code>. + The ECMAScript flag is set on the regex object and UTF-8 documents will exhibit Unicode-compliant + behaviour. For MSVC, where wchar_t is 16-bits, the reular expression ".." will match a single + astral-plane character. There may be other differences between compilers. + Must also have <code>SCFIND_REGEXP</code> set.</td> </tr> </tbody> </table> - <p>In a regular expression, special characters interpreted are:</p> + <p>In a regular expression, using Scintilla's base implementation, + special characters interpreted are:</p> <table border="0" summary="Regular expression synopsis"> <tbody> @@ -860,6 +864,10 @@ struct Sci_TextRange { <p>Regular expressions will only match ranges within a single line, never matching over multiple lines.</p> + <p>When using <code>SCFIND_CXX11REGEX</code> more features are available, + generally similar to regular expression support in JavaScript. + See the documentation of your C++ runtime for details on what is supported.</p> + <code><a class="message" href="#SCI_FINDTEXT">SCI_FINDTEXT(int flags, Sci_TextToFind *ttf)</a><br /> <a class="message" href="#SCI_SEARCHANCHOR">SCI_SEARCHANCHOR</a><br /> @@ -1020,7 +1028,7 @@ struct Sci_TextToFind { <td>Generic failure</td> </tr> - <tr class="provisional"> + <tr> <th align="left">SC_STATUS_BADALLOC</th> <td>2</td> <td>Memory is exhausted</td> @@ -5042,9 +5050,11 @@ struct Sci_TextToFind { <code>SCK_WIN</code>.</p> <p>The modifiers are a combination of zero or more of <code>SCMOD_ALT</code>, - <code>SCMOD_CTRL</code>, <code>SCMOD_SHIFT</code>, and <code>SCMOD_META</code>. + <code>SCMOD_CTRL</code>, <code>SCMOD_SHIFT</code>, + <code>SCMOD_META</code>, and <code>SCMOD_SUPER</code>. On OS X, the Command key is mapped to <code>SCMOD_CTRL</code> and the Control key to <code>SCMOD_META</code>. + <code>SCMOD_SUPER</code> is only available on GTK+ which is commonly the Windows key. If you are building a table, you might want to use <code>SCMOD_NORM</code>, which has the value 0, to mean no modifiers.</p> @@ -7577,8 +7587,6 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next <code class="provisional">SC_TECHNOLOGY_DIRECTWRITEDC</code> values for <a class="message" href="#SCI_SETTECHNOLOGY">SCI_SETTECHNOLOGY</a> are provisional.</p> - <p>Using C++11 <regex> is provisional.</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 69b4a00..7621aab 100644 --- a/scintilla/doc/ScintillaDownload.html +++ b/scintilla/doc/ScintillaDownload.html @@ -26,9 +26,9 @@ <table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
- <font size="4"> <a href="http://www.scintilla.org/scintilla364.zip">
+ <font size="4"> <a href="http://www.scintilla.org/scintilla365.zip">
Windows</a>
- <a href="http://www.scintilla.org/scintilla364.tgz">
+ <a href="http://www.scintilla.org/scintilla365.tgz">
GTK+/Linux</a>
</font>
</td>
@@ -42,7 +42,7 @@ containing very few restrictions.
</p>
<h3>
- Release 3.6.4
+ Release 3.6.5
</h3>
<h4>
Source Code
@@ -50,8 +50,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://www.scintilla.org/scintilla364.zip">zip format</a> (1500K) commonly used on Windows</li>
- <li><a href="http://www.scintilla.org/scintilla364.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
+ <li><a href="http://www.scintilla.org/scintilla365.zip">zip format</a> (1500K) commonly used on Windows</li>
+ <li><a href="http://www.scintilla.org/scintilla365.tgz">tgz format</a> (1400K) 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 14bead6..849c3c7 100644 --- a/scintilla/doc/ScintillaHistory.html +++ b/scintilla/doc/ScintillaHistory.html @@ -484,6 +484,10 @@ </tr><tr>
<td>Mark C</td>
<td>Johannes Sasongko</td>
+ <td>fstirlitz</td>
+ <td>Robin Haberkorn</td>
+ </tr><tr>
+ <td>Pavel Sountsov</td>
</tr>
</table>
<p>
@@ -496,21 +500,65 @@ </li>
</ul>
<h3>
+ <a href="http://www.scintilla.org/scite366.zip">Release 3.6.6</a>
+ </h3>
+ <ul>
+ <li>
+ Released 26 April 2016.
+ </li>
+ <li>
+ C++ 11 <regex> support built by default. Can be disabled by defining NO_CXX11_REGEX.
+ </li>
+ <li>
+ Fixed bugs when used on GTK+ 3.20.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1825/">Bug #1825</a>.
+ </li>
+ <li>
+ Fixed bug on Win32 that allowed resizing autocompletion from bottom when it was
+ located above the caret.
+ </li>
+ </ul>
+ <h3>
<a href="http://www.scintilla.org/scite365.zip">Release 3.6.5</a>
</h3>
<ul>
<li>
- Released 13 March 2016.
+ Released 26 April 2016.
</li>
<li>
JSON lexer added.
<a href="http://sourceforge.net/p/scintilla/feature-requests/1140/">Feature #1140.</a>
</li>
<li>
+ The C++ lexer fixes a bug with multi-line strings with line continuation where the string style
+ overflowed after an edit.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1824/">Bug #1824</a>.
+ </li>
+ <li>
The Python lexer treats '@' as an operator except when it is the first visible character on a line.
This is for Python 3.5.
</li>
<li>
+ The Rust lexer allows '?' as an operator.
+ <a href="http://sourceforge.net/p/scintilla/feature-requests/1146/">Feature #1146.</a>
+ </li>
+ <li>
+ Doubled size of compiled regex buffer.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1822/">Bug #1822</a>.
+ </li>
+ <li>
+ For GTK+, the Super modifier key can be used in key bindings.
+ <a href="http://sourceforge.net/p/scintilla/feature-requests/1142/">Feature #1142.</a>
+ </li>
+ <li>
+ For GTK+, fix some crashes when using multiple threads.
+ </li>
+ <li>
+ Platform layer font cache removed on GTK+ as platform-independent caches are used.
+ This avoids the use of thread locking and initialisation of threads so any GTK+
+ applications that rely on Scintilla initialising threads will have to do that themselves.
+ </li>
+ <li>
SciTE bug fixed with exported HTML where extra line shown.
<a href="http://sourceforge.net/p/scintilla/bugs/1816/">Bug #1816</a>.
</li>
@@ -519,6 +567,9 @@ For the replace strip, menu choices change the state.
For the find strip, menu choices are reflected in the appearance of their corresponding buttons.
</li>
+ <li>
+ SciTE on Windows on high DPI displays fixes the height of edit boxes in user strips.
+ </li>
</ul>
<h3>
<a href="http://www.scintilla.org/scite364.zip">Release 3.6.4</a>
diff --git a/scintilla/doc/ScintillaRelated.html b/scintilla/doc/ScintillaRelated.html index 60d3a4f..dea00ef 100644 --- a/scintilla/doc/ScintillaRelated.html +++ b/scintilla/doc/ScintillaRelated.html @@ -137,7 +137,7 @@ is an XML/JSON editor and XML validator for Windows.
</p>
<p>
- <a href="https://github.com/rhaberkorn/sciteco">SciTECO</a>
+ <a href="http://sciteco.sf.net/">SciTECO</a>
is an advanced TECO dialect and interactive screen editor based on Scintilla.
</p>
<p>
diff --git a/scintilla/doc/index.html b/scintilla/doc/index.html index cc1365f..72f78ac 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="20160313" />
+ <meta name="Date.Modified" content="20160426" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
#versionlist {
@@ -56,8 +56,8 @@ GTK+, and OS X</font>
</td>
<td width="40%" align="right">
- <font color="#FFCC99" size="3"> Release version 3.6.4<br />
- Site last modified March 13 2016</font>
+ <font color="#FFCC99" size="3"> Release version 3.6.5<br />
+ Site last modified April 26 2016</font>
</td>
<td width="20%">
@@ -72,6 +72,7 @@ </tr>
</table>
<ul id="versionlist">
+ <li>Version 3.6.5 adds a JSON lexer and removes the font cache on GTK+.
<li>Version 3.6.4 avoids some folding bugs by automatically unfolding and improves clipboard robustness on Win32.</li>
<li>Version 3.6.3 supports idle-time styling.</li>
<li>Version 3.6.2 fixes crashes and other bugs, particularly on Cocoa.</li>
diff --git a/scintilla/include/Scintilla.iface b/scintilla/include/Scintilla.iface index 419b2b2..2d69a6b 100644 --- a/scintilla/include/Scintilla.iface +++ b/scintilla/include/Scintilla.iface @@ -4757,7 +4757,7 @@ evt void FocusIn=2028(void) evt void FocusOut=2029(void)
evt void AutoCCompleted=2030(string text, int position, int ch, CompletionMethods listCompletionMethod)
-# There are no provisional features currently
+# There are no provisional APIs currently, but some arguments to SCI_SETTECHNOLOGY are provisional.
cat Provisional
diff --git a/scintilla/lexers/LexCPP.cxx b/scintilla/lexers/LexCPP.cxx index 7619000..4261084 100644 --- a/scintilla/lexers/LexCPP.cxx +++ b/scintilla/lexers/LexCPP.cxx @@ -761,6 +761,9 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i lineCurrent++; lineEndNext = styler.LineEnd(lineCurrent); vlls.Add(lineCurrent, preproc); + if (rawStringTerminator != "") { + rawSTNew.Set(lineCurrent-1, rawStringTerminator); + } sc.Forward(); if (sc.ch == '\r' && sc.chNext == '\n') { // Even in UTF-8, \r and \n are separate diff --git a/scintilla/lexers/LexRust.cxx b/scintilla/lexers/LexRust.cxx index 0d40de2..a834e32 100644 --- a/scintilla/lexers/LexRust.cxx +++ b/scintilla/lexers/LexRust.cxx @@ -339,7 +339,7 @@ static bool IsOneCharOperator(int c) { || c == '*' || c == '/' || c == '^' || c == '%' || c == '.' || c == ':' || c == '!' || c == '<' || c == '>' || c == '=' || c == '-' || c == '&' - || c == '|' || c == '$'; + || c == '|' || c == '$' || c == '?'; } static bool IsTwoCharOperator(int c, int n) { diff --git a/scintilla/lexlib/Accessor.cxx b/scintilla/lexlib/Accessor.cxx index 0c3b564..c083492 100644 --- a/scintilla/lexlib/Accessor.cxx +++ b/scintilla/lexlib/Accessor.cxx @@ -1,6 +1,6 @@ // Scintilla source code edit control
-/** @file KeyWords.cxx
- ** Colourise for particular languages.
+/** @file Accessor.cxx
+ ** Interfaces between Scintilla and lexers.
**/
// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
diff --git a/scintilla/lexlib/WordList.cxx b/scintilla/lexlib/WordList.cxx index 7ac00ad..2acabaf 100644 --- a/scintilla/lexlib/WordList.cxx +++ b/scintilla/lexlib/WordList.cxx @@ -1,6 +1,6 @@ // Scintilla source code edit control
-/** @file KeyWords.cxx
- ** Colourise for particular languages.
+/** @file WordList.cxx
+ ** Hold a list of words.
**/
// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
diff --git a/scintilla/scripts/HeaderOrder.txt b/scintilla/scripts/HeaderOrder.txt index 054086d..df4f0f4 100644 --- a/scintilla/scripts/HeaderOrder.txt +++ b/scintilla/scripts/HeaderOrder.txt @@ -13,6 +13,7 @@ #include <assert.h> #include <ctype.h> #include <limits.h> +#include <sys/time.h> // C++ wrappers of C standard library #include <cstdlib> @@ -31,6 +32,7 @@ #include <map> #include <set> #include <algorithm> +#include <functional> #include <memory> #include <regex> #include <sstream> @@ -54,6 +56,10 @@ // Cocoa headers #include <Cocoa/Cocoa.h> +#import <Foundation/NSGeometry.h> +#import <QuartzCore/CAGradientLayer.h> +#import <QuartzCore/CAAnimation.h> +#import <QuartzCore/CATransaction.h> // Scintilla headers @@ -106,6 +112,7 @@ #include "Decoration.h" #include "CaseFolder.h" #include "Document.h" +#include "RESearch.h" #include "CaseConvert.h" #include "UniConversion.h" #include "UnicodeFromUTF8.h" @@ -129,10 +136,15 @@ #include "HanjaDic.h" // gtk +#include "scintilla-marshal.h" #include "Converter.h" // cocoa #include "QuartzTextStyle.h" #include "QuartzTextStyleAttribute.h" +#include "QuartzTextLayout.h" #import "InfoBarCommunicator.h" #include "InfoBar.h" +#import "ScintillaView.h" +#import "ScintillaCocoa.h" +#import "PlatCocoa.h" diff --git a/scintilla/src/Document.cxx b/scintilla/src/Document.cxx index 1d02962..6aa8697 100644 --- a/scintilla/src/Document.cxx +++ b/scintilla/src/Document.cxx @@ -16,7 +16,7 @@ #include <vector>
#include <algorithm>
-#ifdef CXX11_REGEX
+#ifndef NO_CXX11_REGEX
#include <regex>
#endif
@@ -2336,7 +2336,7 @@ public: }
};
-#ifdef CXX11_REGEX
+#ifndef NO_CXX11_REGEX
class ByteIterator : public std::iterator<std::bidirectional_iterator_tag, char> {
public:
@@ -2617,9 +2617,9 @@ bool MatchOnLines(const Document *doc, const Regex ®exp, const RESearchRange for (size_t co = 0; co < match.size(); co++) {
search.bopat[co] = match[co].first.Pos();
search.eopat[co] = match[co].second.PosRoundUp();
- size_t lenMatch = search.eopat[co] - search.bopat[co];
+ Sci::Position lenMatch = search.eopat[co] - search.bopat[co];
search.pat[co].resize(lenMatch);
- for (size_t iPos = 0; iPos < lenMatch; iPos++) {
+ for (Sci::Position iPos = 0; iPos < lenMatch; iPos++) {
search.pat[co][iPos] = doc->CharAt(iPos + search.bopat[co]);
}
}
@@ -2696,7 +2696,7 @@ long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s bool caseSensitive, bool, bool, int flags,
int *length) {
-#ifdef CXX11_REGEX
+#ifndef NO_CXX11_REGEX
if (flags & SCFIND_CXX11REGEX) {
return Cxx11RegexFindText(doc, minPos, maxPos, s,
caseSensitive, length, search);
diff --git a/scintilla/src/EditView.cxx b/scintilla/src/EditView.cxx index 805971a..9ca6e95 100644 --- a/scintilla/src/EditView.cxx +++ b/scintilla/src/EditView.cxx @@ -1,5 +1,5 @@ // Scintilla source code edit control -/** @file Editor.cxx +/** @file EditView.cxx ** Defines the appearance of the main text area of the editor window. **/ // Copyright 1998-2014 by Neil Hodgson <neilh@scintilla.org> diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index a5d34a0..5c211c0 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -303,7 +303,7 @@ int Editor::TopLineOfMain() const { }
PRectangle Editor::GetClientRectangle() const {
- Window &win = const_cast<Window &>(wMain);
+ Window win = wMain;
return win.GetClientPosition();
}
@@ -2265,12 +2265,13 @@ void Editor::DelCharBack(bool allowLineStartDeletion) { ShowCaretAtCurrentPosition();
}
-int Editor::ModifierFlags(bool shift, bool ctrl, bool alt, bool meta) {
+int Editor::ModifierFlags(bool shift, bool ctrl, bool alt, bool meta, bool super) {
return
(shift ? SCI_SHIFT : 0) |
(ctrl ? SCI_CTRL : 0) |
(alt ? SCI_ALT : 0) |
- (meta ? SCI_META : 0);
+ (meta ? SCI_META : 0) |
+ (super ? SCI_SUPER : 0);
}
void Editor::NotifyFocus(bool focus) {
diff --git a/scintilla/src/Editor.h b/scintilla/src/Editor.h index 2ab4c1a..ccb5fd0 100644 --- a/scintilla/src/Editor.h +++ b/scintilla/src/Editor.h @@ -414,7 +414,7 @@ protected: // ScintillaBase subclass needs access to much of Editor void DelCharBack(bool allowLineStartDeletion);
virtual void ClaimSelection() = 0;
- static int ModifierFlags(bool shift, bool ctrl, bool alt, bool meta=false);
+ static int ModifierFlags(bool shift, bool ctrl, bool alt, bool meta=false, bool super=false);
virtual void NotifyChange() = 0;
virtual void NotifyFocus(bool focus);
virtual void SetCtrlID(int identifier);
diff --git a/scintilla/src/KeyMap.h b/scintilla/src/KeyMap.h index 11d6006..e3b3ce5 100644 --- a/scintilla/src/KeyMap.h +++ b/scintilla/src/KeyMap.h @@ -17,6 +17,7 @@ namespace Scintilla { #define SCI_CTRL SCMOD_CTRL
#define SCI_ALT SCMOD_ALT
#define SCI_META SCMOD_META
+#define SCI_SUPER SCMOD_SUPER
#define SCI_CSHIFT (SCI_CTRL | SCI_SHIFT)
#define SCI_ASHIFT (SCI_ALT | SCI_SHIFT)
diff --git a/scintilla/src/RESearch.h b/scintilla/src/RESearch.h index 7421178..3dced14 100644 --- a/scintilla/src/RESearch.h +++ b/scintilla/src/RESearch.h @@ -39,7 +39,7 @@ public: int Execute(CharacterIndexer &ci, int lp, int endp);
enum { MAXTAG=10 };
- enum { MAXNFA=2048 };
+ enum { MAXNFA=4096 };
enum { NOTFOUND=-1 };
int bopat[MAXTAG];
diff --git a/scintilla/version.txt b/scintilla/version.txt index d5e11d3..b434cca 100644 --- a/scintilla/version.txt +++ b/scintilla/version.txt @@ -1 +1 @@ -364
+365
diff --git a/scintilla/win32/PlatWin.cxx b/scintilla/win32/PlatWin.cxx index 61eb237..e7668ee 100644 --- a/scintilla/win32/PlatWin.cxx +++ b/scintilla/win32/PlatWin.cxx @@ -2582,6 +2582,9 @@ void ListBoxX::StartResize(WPARAM hitCode) { }
LRESULT ListBoxX::NcHitTest(WPARAM wParam, LPARAM lParam) const {
+ Window win = *this; // Copy HWND to avoid const problems
+ const PRectangle rc = win.GetPosition();
+
LRESULT hit = ::DefWindowProc(GetHWND(), WM_NCHITTEST, wParam, lParam);
// There is an apparent bug in the DefWindowProc hit test code whereby it will
// return HTTOPXXX if the window in question is shorter than the default
@@ -2589,7 +2592,6 @@ LRESULT ListBoxX::NcHitTest(WPARAM wParam, LPARAM lParam) const { // the frame, so workaround that here
if (hit >= HTTOP && hit <= HTTOPRIGHT) {
int minHeight = GetSystemMetrics(SM_CYMINTRACK);
- PRectangle rc = const_cast<ListBoxX*>(this)->GetPosition();
int yPos = GET_Y_LPARAM(lParam);
if ((rc.Height() < minHeight) && (yPos > ((rc.top + rc.bottom)/2))) {
hit += HTBOTTOM - HTTOP;
@@ -2607,7 +2609,6 @@ LRESULT ListBoxX::NcHitTest(WPARAM wParam, LPARAM lParam) const { case HTTOP:
case HTTOPRIGHT: {
- PRectangle rc = const_cast<ListBoxX*>(this)->GetPosition();
// Valid only if caret below list
if (location.y < rc.top)
hit = HTERROR;
@@ -2616,9 +2617,8 @@ LRESULT ListBoxX::NcHitTest(WPARAM wParam, LPARAM lParam) const { case HTBOTTOM:
case HTBOTTOMRIGHT: {
- PRectangle rc = const_cast<ListBoxX*>(this)->GetPosition();
// Valid only if caret above list
- if (rc.bottom < location.y)
+ if (rc.bottom <= location.y)
hit = HTERROR;
}
break;
@@ -2635,7 +2635,8 @@ void ListBoxX::OnDoubleClick() { }
POINT ListBoxX::GetClientExtent() const {
- PRectangle rc = const_cast<ListBoxX*>(this)->GetClientPosition();
+ Window win = *this; // Copy HWND to avoid const problems
+ const PRectangle rc = win.GetPosition();
POINT ret;
ret.x = static_cast<LONG>(rc.Width());
ret.y = static_cast<LONG>(rc.Height());
diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx index 204efb1..fa25b3f 100644 --- a/scintilla/win32/ScintillaWin.cxx +++ b/scintilla/win32/ScintillaWin.cxx @@ -1093,10 +1093,10 @@ sptr_t ScintillaWin::HandleCompositionInline(uptr_t, sptr_t lParam) { recordingMacro = tmpRecordingMacro;
// Move IME caret from current last position to imeCaretPos.
- int toImeStart = static_cast<unsigned int>(StringEncode(wcs, codePage).size());
- std::string imeCaret(StringEncode(wcs.substr(0, imc.GetImeCaretPos()), codePage));
- int toImeCaret = static_cast<unsigned int>(imeCaret.size());
- MoveImeCarets(- toImeStart + toImeCaret);
+ int imeEndToImeCaretU16 = imc.GetImeCaretPos() - static_cast<unsigned int>(wcs.size());
+ int imeCaretPosDoc = pdoc->GetRelativePositionUTF16(CurrentPosition(), imeEndToImeCaretU16);
+
+ MoveImeCarets(- CurrentPosition() + imeCaretPosDoc);
if (KoreanIME()) {
view.imeCaretBlockOverride = true;
|