diff --git a/Versions/build.txt b/Versions/build.txt
index d370470db..4b7816b57 100644
--- a/Versions/build.txt
+++ b/Versions/build.txt
@@ -1 +1 @@
-1451
+1452
diff --git a/np3portableapp/_buildname.txt b/np3portableapp/_buildname.txt
index 2bb514739..794ec41ca 100644
--- a/np3portableapp/_buildname.txt
+++ b/np3portableapp/_buildname.txt
@@ -1 +1 @@
-"Dev_Test_2"
+"develop"
diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf
index c74b965ca..d1a85511c 100644
--- a/res/Notepad3.exe.manifest.conf
+++ b/res/Notepad3.exe.manifest.conf
@@ -3,7 +3,7 @@
Notepad3 develop
diff --git a/scintilla/Scintilla.vcxproj b/scintilla/Scintilla.vcxproj
index a89a0d18c..041530c9a 100644
--- a/scintilla/Scintilla.vcxproj
+++ b/scintilla/Scintilla.vcxproj
@@ -217,47 +217,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -295,7 +258,6 @@
-
@@ -357,9 +319,7 @@
-
-
diff --git a/scintilla/Scintilla.vcxproj.filters b/scintilla/Scintilla.vcxproj.filters
index 2999f6f94..4f70a8c0b 100644
--- a/scintilla/Scintilla.vcxproj.filters
+++ b/scintilla/Scintilla.vcxproj.filters
@@ -342,9 +342,6 @@
sciXlexers
-
- lexers
-
diff --git a/scintilla/doc/ScintillaHistory.html b/scintilla/doc/ScintillaHistory.html
index 0908fcc08..3965ac8e9 100644
--- a/scintilla/doc/ScintillaHistory.html
+++ b/scintilla/doc/ScintillaHistory.html
@@ -582,6 +582,11 @@
Bug #2062.
+ The C++ lexer interprets preprocessor arithmetic expressions containing multiplicative and additive
+ operators correctly by following operator precedence rules.
+ Bug #2069.
+
+
For SciTE's Find in Files, allow case-sensitivity and whole-word options when running
a user defined command.
Bug #2053.
diff --git a/scintilla/lexers/LexCPP.cxx b/scintilla/lexers/LexCPP.cxx
index fbd3186c6..3b8e5ca8b 100644
--- a/scintilla/lexers/LexCPP.cxx
+++ b/scintilla/lexers/LexCPP.cxx
@@ -484,7 +484,8 @@ class LexerCPP : public ILexer4 {
bool caseSensitive;
CharacterSet setWord;
CharacterSet setNegationOp;
- CharacterSet setArithmethicOp;
+ CharacterSet setAddOp;
+ CharacterSet setMultOp;
CharacterSet setRelOp;
CharacterSet setLogicalOp;
CharacterSet setWordStart;
@@ -525,7 +526,8 @@ public:
caseSensitive(caseSensitive_),
setWord(CharacterSet::setAlphaNum, "._", 0x80, true),
setNegationOp(CharacterSet::setNone, "!"),
- setArithmethicOp(CharacterSet::setNone, "+-/*%"),
+ setAddOp(CharacterSet::setNone, "+-"),
+ setMultOp(CharacterSet::setNone, "*/%"),
setRelOp(CharacterSet::setNone, "=!<>"),
setLogicalOp(CharacterSet::setNone, "|&"),
subStyles(styleSubable, 0x80, 0x40, activeFlag) {
@@ -1628,13 +1630,15 @@ void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTabl
}
// Evaluate expressions in precedence order
- enum precedence { precArithmetic, precRelative, precLogical };
- for (int prec=precArithmetic; prec <= precLogical; prec++) {
+ enum precedence { precMult, precAdd, precRelative
+ , precLogical, /* end marker */ precLast };
+ for (int prec = precMult; prec < precLast; prec++) {
// Looking at 3 tokens at a time so end at 2 before end
for (size_t k=0; (k+2) &tokens, const SymbolTabl
result = valA || valB;
else if (tokens[k+1] == "&&")
result = valA && valB;
- char sResult[30];
- sprintf(sResult, "%d", result);
std::vector::iterator itInsert =
tokens.erase(tokens.begin() + k, tokens.begin() + k + 3);
- tokens.insert(itInsert, sResult);
+ tokens.insert(itInsert, std::to_string(result));
} else {
k++;
}
diff --git a/src/Helpers.h b/src/Helpers.h
index 3de486f62..54d65c7f4 100644
--- a/src/Helpers.h
+++ b/src/Helpers.h
@@ -182,16 +182,6 @@ DWORD GetLastErrorToMsgBox(LPWSTR lpszFunction, DWORD dwErrID);
// ----------------------------------------------------------------------------
-inline bool IsFullHDOrHigher(int resX, int resY) {
- if (resX <= 0) { resX = GetSystemMetrics(SM_CXSCREEN); }
- if (resY <= 0) { resY = GetSystemMetrics(SM_CYSCREEN); }
- return ((resX >= 1920) && (resY >= 1080));
-}
-
-#define INITIAL_BASE_FONT_SIZE (IsFullHDOrHigher(-1, -1) ? 11.0f : 10.0f)
-
-// ----------------------------------------------------------------------------
-
//#define Is2k() (g_uWinVer >= 0x0500)
#define IsXP() IsWindowsXPOrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP version.
#define IsXP1() IsWindowsXPSP1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP with Service Pack 1 (SP1)version.
@@ -227,6 +217,19 @@ inline int ScaleToCurrentDPI(float fVal) { return float2int((fVal * Globals.Curr
#define ScaleIntFontSize(val) MulDiv((val), Globals.CurrentDPI.y, Globals.CurrentPPI.y)
inline int ScaleFontSize(float fSize) { return float2int((fSize * Globals.CurrentDPI.y) / (float)Globals.CurrentPPI.y); }
inline int ScaleFractionalFontSize(float fSize) { return float2int((fSize * 10.0f * Globals.CurrentDPI.y) / (float)Globals.CurrentPPI.y) * 10; }
+int GetSystemMetricsEx(int nValue);
+
+// ----------------------------------------------------------------------------
+
+inline bool IsFullHDOrHigher(int resX, int resY) {
+ if (resX <= 0) { resX = GetSystemMetrics(SM_CXSCREEN); }
+ if (resY <= 0) { resY = GetSystemMetrics(SM_CYSCREEN); }
+ return ((resX >= 1920) && (resY >= 1080));
+}
+
+#define INITIAL_BASE_FONT_SIZE (IsFullHDOrHigher(-1, -1) ? 11.0f : 10.0f)
+
+// ----------------------------------------------------------------------------
HRESULT PrivateSetCurrentProcessExplicitAppUserModelID(PCWSTR AppID);
bool IsElevated();
diff --git a/src/VersionEx.h b/src/VersionEx.h
index 1bd9a17ff..edd41f55a 100644
--- a/src/VersionEx.h
+++ b/src/VersionEx.h
@@ -6,8 +6,8 @@
#define APPNAME "Notepad3"
#define VERSION_MAJOR 5
#define VERSION_MINOR 18
-#define VERSION_REV 1208
-#define VERSION_BUILD 1451
+#define VERSION_REV 1213
+#define VERSION_BUILD 1452
#define SCINTILLA_VER 412
#define ONIGMO_REGEX_VER 6.1.3
#define VERSION_PATCH "develop"