aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/SciLexer.h2
-rw-r--r--include/Scintilla.h22
-rw-r--r--include/Scintilla.iface23
-rw-r--r--src/Editor.cxx80
-rw-r--r--src/Editor.h1
-rw-r--r--src/LexHTML.cxx141
6 files changed, 11 insertions, 258 deletions
diff --git a/include/SciLexer.h b/include/SciLexer.h
index 38f5d0de6..d9836fdb7 100644
--- a/include/SciLexer.h
+++ b/include/SciLexer.h
@@ -1337,8 +1337,6 @@
#define SCE_SML_COMMENT1 13
#define SCE_SML_COMMENT2 14
#define SCE_SML_COMMENT3 15
-#define SCLEX_ASP 29
-#define SCLEX_PHP 30
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
#endif
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 666dcdbfa..d3dd18b87 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -871,26 +871,4 @@ struct SCNotification {
}
#endif
-/* Deprecation section listing all API features that are deprecated and
- * will be removed completely in a future version.
- * To enable these features define INCLUDE_DEPRECATED_FEATURES */
-
-#ifdef INCLUDE_DEPRECATED_FEATURES
-
-#define SCI_SETCARETPOLICY 2369
-#define CARET_CENTER 0x02
-#define CARET_XEVEN 0x08
-#define CARET_XJUMPS 0x10
-
-#define SC_FOLDFLAG_BOX 0x0001
-#define SC_FOLDLEVELBOXHEADERFLAG 0x4000
-#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000
-#define SC_FOLDLEVELCONTRACTED 0x10000
-#define SC_FOLDLEVELUNINDENT 0x20000
-
-#define SCN_POSCHANGED 2012
-#define SCN_CHECKBRACE 2007
-
-#endif
-
#endif
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 97cf8ac16..55fec9a7b 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -3557,26 +3557,3 @@ evt void IndicatorClick=2023(int modifiers, int position)
evt void IndicatorRelease=2024(int modifiers, int position)
evt void AutoCCancelled=2025(void)
evt void AutoCCharDeleted=2026(void)
-
-cat Deprecated
-
-# CARET_POLICY changed in 1.47
-fun void SetCaretPolicy=2369(int caretPolicy, int caretSlop)
-val CARET_CENTER=0x02
-val CARET_XEVEN=0x08
-val CARET_XJUMPS=0x10
-
-# The old name for SCN_UPDATEUI
-val SCN_CHECKBRACE=2007
-evt void PosChanged=2012(int position)
-
-# Box folding support
-val SC_FOLDFLAG_BOX=0x0001
-val SC_FOLDLEVELBOXHEADERFLAG=0x4000
-val SC_FOLDLEVELBOXFOOTERFLAG=0x8000
-val SC_FOLDLEVELCONTRACTED=0x10000
-val SC_FOLDLEVELUNINDENT=0x20000
-
-# SCLEX_HTML should be used in preference to these.
-val SCLEX_ASP=29
-val SCLEX_PHP=30
diff --git a/src/Editor.cxx b/src/Editor.cxx
index d1aba6885..89e1ce69d 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -12,9 +12,6 @@
#include "Platform.h"
-#ifndef PLAT_QT
-#define INCLUDE_DEPRECATED_FEATURES
-#endif
#include "Scintilla.h"
#include "SplitVector.h"
@@ -818,7 +815,6 @@ int Editor::MovePositionTo(int newPos, selTypes sel, bool ensureVisible) {
if (ensureVisible) {
EnsureCaretVisible();
}
- NotifyMove(newPos);
return 0;
}
@@ -3074,66 +3070,26 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
ll->RestoreBracesHighlight(rangeLine, braces);
bool expanded = cs.GetExpanded(lineDoc);
-#ifdef INCLUDE_DEPRECATED_FEATURES
- if ((foldFlags & SC_FOLDFLAG_BOX) == 0) {
-#endif
- // Paint the line above the fold
- if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED))
- ||
- (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) {
- if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) {
- PRectangle rcFoldLine = rcLine;
- rcFoldLine.bottom = rcFoldLine.top + 1;
- surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
- }
- }
- // Paint the line below the fold
- if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED))
- ||
- (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) {
- if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) {
- PRectangle rcFoldLine = rcLine;
- rcFoldLine.top = rcFoldLine.bottom - 1;
- surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
- }
- }
-#ifdef INCLUDE_DEPRECATED_FEATURES
- } else {
- int FoldLevelCurr = (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE;
- int FoldLevelPrev = (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE;
- int FoldLevelFlags = (pdoc->GetLevel(lineDoc) & ~SC_FOLDLEVELNUMBERMASK) & ~(0xFFF0000);
- int indentationStep = pdoc->IndentSize();
- // Draw line above fold
- if ((FoldLevelPrev < FoldLevelCurr)
- ||
- (FoldLevelFlags & SC_FOLDLEVELBOXHEADERFLAG
- &&
- (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELBOXFOOTERFLAG) == 0)) {
+ // Paint the line above the fold
+ if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED))
+ ||
+ (!expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) {
+ if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) {
PRectangle rcFoldLine = rcLine;
rcFoldLine.bottom = rcFoldLine.top + 1;
- rcFoldLine.left += xStart + FoldLevelCurr * vs.spaceWidth * indentationStep - 1;
surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
}
-
- // Line below the fold (or below a contracted fold)
- if (FoldLevelFlags & SC_FOLDLEVELBOXFOOTERFLAG
- ||
- (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) {
+ }
+ // Paint the line below the fold
+ if ((expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED))
+ ||
+ (!expanded && (foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) {
+ if (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELHEADERFLAG) {
PRectangle rcFoldLine = rcLine;
rcFoldLine.top = rcFoldLine.bottom - 1;
- rcFoldLine.left += xStart + (FoldLevelCurr) * vs.spaceWidth * indentationStep - 1;
surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
}
-
- PRectangle rcBoxLine = rcLine;
- // Draw vertical line for every fold level
- for (int i = 0; i <= FoldLevelCurr; i++) {
- rcBoxLine.left = xStart + i * vs.spaceWidth * indentationStep - 1;
- rcBoxLine.right = rcBoxLine.left + 1;
- surface->FillRectangle(rcBoxLine, vs.styles[STYLE_DEFAULT].fore.allocated);
- }
}
-#endif
// Draw the Caret
if (lineDoc == lineCaret) {
@@ -3918,13 +3874,6 @@ void Editor::NotifyModifyAttempt(Document*, void *) {
NotifyModifyAttempt();
}
-void Editor::NotifyMove(int position) {
- SCNotification scn = {0};
- scn.nmhdr.code = SCN_POSCHANGED;
- scn.position = position;
- NotifyParent(scn);
-}
-
void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) {
//Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off");
NotifySavePoint(atSavePoint);
@@ -7275,13 +7224,6 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_SEARCHPREV:
return SearchText(iMessage, wParam, lParam);
-#ifdef INCLUDE_DEPRECATED_FEATURES
- case SCI_SETCARETPOLICY: // Deprecated
- caretXPolicy = caretYPolicy = wParam;
- caretXSlop = caretYSlop = lParam;
- break;
-#endif
-
case SCI_SETXCARETPOLICY:
caretXPolicy = wParam;
caretXSlop = lParam;
diff --git a/src/Editor.h b/src/Editor.h
index d37606d5a..1c50e7390 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -362,7 +362,6 @@ protected: // ScintillaBase subclass needs access to much of Editor
virtual void NotifyParent(SCNotification scn) = 0;
virtual void NotifyStyleToNeeded(int endStyleNeeded);
void NotifyChar(int ch);
- void NotifyMove(int position);
void NotifySavePoint(bool isSavePoint);
void NotifyModifyAttempt();
virtual void NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt);
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index 99afa2309..3a28a01f8 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -2052,144 +2052,6 @@ static void ColouriseHTMLPiece(StyleContext &sc, WordList *keywordlists[]) {
}
}
-static void ColouriseASPPiece(StyleContext &sc, WordList *keywordlists[]) {
- // Possibly exit current state to either SCE_H_DEFAULT or SCE_HBA_DEFAULT
- if ((sc.state == SCE_H_ASPAT || isASPScript(sc.state)) && sc.Match('%', '>')) {
- sc.SetState(SCE_H_ASP);
- sc.Forward();
- sc.ForwardSetState(SCE_H_DEFAULT);
- }
-
- // Handle some ASP script
- if (sc.state >= SCE_HBA_START && sc.state <= SCE_HBA_STRINGEOL) {
- ColouriseHBAPiece(sc, keywordlists);
- } else if (sc.state >= SCE_H_DEFAULT && sc.state <= SCE_H_SGML_BLOCK_DEFAULT) {
- ColouriseHTMLPiece(sc, keywordlists);
- }
-
- // Enter new sc.state
- if ((sc.state == SCE_H_DEFAULT) || (sc.state == SCE_H_TAGUNKNOWN)) {
- if (sc.Match('<', '%')) {
- if (sc.state == SCE_H_TAGUNKNOWN)
- sc.ChangeState(SCE_H_ASP);
- else
- sc.SetState(SCE_H_ASP);
- sc.Forward();
- sc.Forward();
- if (sc.ch == '@') {
- sc.ForwardSetState(SCE_H_ASPAT);
- } else {
- if (sc.ch == '=') {
- sc.Forward();
- }
- sc.SetState(SCE_HBA_DEFAULT);
- }
- }
- }
-}
-
-static void ColouriseASPDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
- Accessor &styler) {
- // Lexer for HTML requires more lexical states (8 bits worth) than most lexers
- StyleContext sc(startPos, length, initStyle, styler, static_cast<char>(STYLE_MAX));
- for (; sc.More(); sc.Forward()) {
- ColouriseASPPiece(sc, keywordlists);
- }
- sc.Complete();
-}
-
-static void ColourisePHPPiece(StyleContext &sc, WordList *keywordlists[]) {
- // Possibly exit current state to either SCE_H_DEFAULT or SCE_HBA_DEFAULT
- if (sc.state >= SCE_HPHP_DEFAULT && sc.state <= SCE_HPHP_OPERATOR) {
- if (!isPHPStringState(sc.state) &&
- (sc.state != SCE_HPHP_COMMENT) &&
- (sc.Match('?', '>'))) {
- sc.SetState(SCE_H_QUESTION);
- sc.Forward();
- sc.ForwardSetState(SCE_H_DEFAULT);
- }
- }
-
- if (sc.state >= SCE_H_DEFAULT && sc.state <= SCE_H_SGML_BLOCK_DEFAULT) {
- ColouriseHTMLPiece(sc, keywordlists);
- }
-
- // Handle some PHP script
- if (sc.state == SCE_HPHP_WORD) {
- if (!IsPhpWordChar(static_cast<char>(sc.ch))) {
- sc.SetState(SCE_HPHP_DEFAULT);
- }
- } else if (sc.state == SCE_HPHP_COMMENTLINE) {
- if (sc.ch == '\r' || sc.ch == '\n') {
- sc.SetState(SCE_HPHP_DEFAULT);
- }
- } else if (sc.state == SCE_HPHP_COMMENT) {
- if (sc.Match('*', '/')) {
- sc.Forward();
- sc.Forward();
- sc.SetState(SCE_HPHP_DEFAULT);
- }
- } else if (sc.state == SCE_HPHP_HSTRING) {
- if (sc.ch == '\"') {
- sc.ForwardSetState(SCE_HPHP_DEFAULT);
- }
- } else if (sc.state == SCE_HPHP_SIMPLESTRING) {
- if (sc.ch == '\'') {
- sc.ForwardSetState(SCE_HPHP_DEFAULT);
- }
- } else if (sc.state == SCE_HPHP_VARIABLE) {
- if (!IsPhpWordChar(static_cast<char>(sc.ch))) {
- sc.SetState(SCE_HPHP_DEFAULT);
- }
- } else if (sc.state == SCE_HPHP_OPERATOR) {
- sc.SetState(SCE_HPHP_DEFAULT);
- }
-
- // Enter new sc.state
- if ((sc.state == SCE_H_DEFAULT) || (sc.state == SCE_H_TAGUNKNOWN)) {
- if (sc.Match("<?php")) {
- sc.SetState(SCE_H_QUESTION);
- sc.Forward();
- sc.Forward();
- sc.Forward();
- sc.Forward();
- sc.Forward();
- sc.SetState(SCE_HPHP_DEFAULT);
- }
- }
- if (sc.state == SCE_HPHP_DEFAULT) {
- if (IsPhpWordStart(static_cast<char>(sc.ch))) {
- sc.SetState(SCE_HPHP_WORD);
- } else if (sc.ch == '#') {
- sc.SetState(SCE_HPHP_COMMENTLINE);
- } else if (sc.Match("<!--")) {
- sc.SetState(SCE_HPHP_COMMENTLINE);
- } else if (sc.Match('/', '/')) {
- sc.SetState(SCE_HPHP_COMMENTLINE);
- } else if (sc.Match('/', '*')) {
- sc.SetState(SCE_HPHP_COMMENT);
- } else if (sc.ch == '\"') {
- sc.SetState(SCE_HPHP_HSTRING);
- } else if (sc.ch == '\'') {
- sc.SetState(SCE_HPHP_SIMPLESTRING);
- } else if (sc.ch == '$' && IsPhpWordStart(static_cast<char>(sc.chNext))) {
- sc.SetState(SCE_HPHP_VARIABLE);
- } else if (IsOperator(static_cast<char>(sc.ch))) {
- sc.SetState(SCE_HPHP_OPERATOR);
- }
- }
-}
-
-static void ColourisePHPDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
- Accessor &styler) {
- // Lexer for HTML requires more lexical states (8 bits worth) than most lexers
- StyleContext sc(startPos, length, initStyle, styler, static_cast<char>(STYLE_MAX));
- for (; sc.More(); sc.Forward()) {
- ColourisePHPPiece(sc, keywordlists);
- }
- sc.Complete();
-}
-
static void ColourisePHPScriptDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
Accessor &styler) {
if (startPos == 0)
@@ -2219,7 +2081,4 @@ static const char * const phpscriptWordListDesc[] = {
LexerModule lmHTML(SCLEX_HTML, ColouriseHTMLDoc, "hypertext", 0, htmlWordListDesc, 8);
LexerModule lmXML(SCLEX_XML, ColouriseXMLDoc, "xml", 0, htmlWordListDesc, 8);
-// SCLEX_ASP and SCLEX_PHP should not be used in new code: use SCLEX_HTML instead.
-LexerModule lmASP(SCLEX_ASP, ColouriseASPDoc, "asp", 0, htmlWordListDesc, 8);
-LexerModule lmPHP(SCLEX_PHP, ColourisePHPDoc, "php", 0, htmlWordListDesc, 8);
LexerModule lmPHPSCRIPT(SCLEX_PHPSCRIPT, ColourisePHPScriptDoc, "phpscript", 0, phpscriptWordListDesc, 8);