summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scintilla/include/Platform.h6
-rw-r--r--scintilla/lexers/LexHTML.cxx31
-rw-r--r--scintilla/lexers/LexPerl.cxx6
-rw-r--r--scintilla/src/Editor.cxx2
-rw-r--r--scintilla/win32/PlatWin.cxx7
5 files changed, 43 insertions, 9 deletions
diff --git a/scintilla/include/Platform.h b/scintilla/include/Platform.h
index ec76874..b5f95f9 100644
--- a/scintilla/include/Platform.h
+++ b/scintilla/include/Platform.h
@@ -302,7 +302,7 @@ public:
// Alias another font - caller guarantees not to Release
void SetID(FontID fid_) { fid = fid_; }
friend class Surface;
- friend class SurfaceImpl;
+ friend class SurfaceImpl;
};
/**
@@ -411,8 +411,8 @@ public:
void SetTitle(const char *s);
PRectangle GetMonitorRect(Point pt);
#if PLAT_MACOSX
- void SetWindow(void *ref) { windowRef = ref; };
- void SetControl(void *_control) { control = _control; };
+ void SetWindow(void *ref) { windowRef = ref; }
+ void SetControl(void *_control) { control = _control; }
#endif
private:
Cursor cursorLast;
diff --git a/scintilla/lexers/LexHTML.cxx b/scintilla/lexers/LexHTML.cxx
index a456612..242a37d 100644
--- a/scintilla/lexers/LexHTML.cxx
+++ b/scintilla/lexers/LexHTML.cxx
@@ -955,6 +955,37 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
continue;
}
+ // handle the start/end of Django comment
+ else if (isDjango && state != SCE_H_COMMENT && (ch == '{' && chNext == '#')) {
+ styler.ColourTo(i - 1, StateToPrint);
+ beforePreProc = state;
+ beforeLanguage = scriptLanguage;
+ if (inScriptType == eNonHtmlScript)
+ inScriptType = eNonHtmlScriptPreProc;
+ else
+ inScriptType = eNonHtmlPreProc;
+ i += 1;
+ visibleChars += 1;
+ scriptLanguage = eScriptComment;
+ state = SCE_H_COMMENT;
+ styler.ColourTo(i, SCE_H_ASP);
+ ch = static_cast<unsigned char>(styler.SafeGetCharAt(i));
+ continue;
+ }
+ else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) {
+ styler.ColourTo(i - 1, StateToPrint);
+ i += 1;
+ visibleChars += 1;
+ styler.ColourTo(i, SCE_H_ASP);
+ state = beforePreProc;
+ if (inScriptType == eNonHtmlScriptPreProc)
+ inScriptType = eNonHtmlScript;
+ else
+ inScriptType = eHtml;
+ scriptLanguage = beforeLanguage;
+ continue;
+ }
+
// handle the start Django template code
else if (isDjango && scriptLanguage != eScriptPython && (ch == '{' && (chNext == '%' || chNext == '{'))) {
if (chNext == '%')
diff --git a/scintilla/lexers/LexPerl.cxx b/scintilla/lexers/LexPerl.cxx
index e345a9b..6c9b427 100644
--- a/scintilla/lexers/LexPerl.cxx
+++ b/scintilla/lexers/LexPerl.cxx
@@ -1357,10 +1357,8 @@ void SCI_METHOD LexerPerl::Fold(unsigned int startPos, int length, int /* initSt
// Backtrack to previous line in case need to fix its fold status
if (startPos > 0) {
if (lineCurrent > 0) {
- if (IsCommentLine(lineCurrent - 1, styler)) {
- lineCurrent--;
- startPos = styler.LineStart(lineCurrent);
- }
+ lineCurrent--;
+ startPos = styler.LineStart(lineCurrent);
}
}
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx
index f018adc..245ef14 100644
--- a/scintilla/src/Editor.cxx
+++ b/scintilla/src/Editor.cxx
@@ -957,7 +957,9 @@ void Editor::ScrollTo(int line, bool moveThumb) {
int topLineNew = Platform::Clamp(line, 0, MaxScrollPos());
if (topLineNew != topLine) {
// Try to optimise small scrolls
+#ifndef UNDER_CE
int linesToMove = topLine - topLineNew;
+#endif
SetTopLine(topLineNew);
// Optimize by styling the view as this will invalidate any needed area
// which could abort the initial paint if discovered later.
diff --git a/scintilla/win32/PlatWin.cxx b/scintilla/win32/PlatWin.cxx
index cf9a34f..3c34d19 100644
--- a/scintilla/win32/PlatWin.cxx
+++ b/scintilla/win32/PlatWin.cxx
@@ -27,12 +27,15 @@
#include "XPM.h"
#include "FontQuality.h"
+/* notepad2-mod custom code start */
+/* MultiMon.h is not included in WDK 7.1
// We want to use multi monitor functions, but via LoadLibrary etc
// Luckily microsoft has done the heavy lifting for us, so we'll just use their stub functions!
-#if defined(_MSC_VER) && (MSC_VER > 1200)
+#if defined(_MSC_VER) && (_MSC_VER > 1200)
#define COMPILE_MULTIMON_STUBS
#include "MultiMon.h"
-#endif
+#endif */
+/* notepad2-mod custom code end */
#ifndef IDC_HAND
#define IDC_HAND MAKEINTRESOURCE(32649)