aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-05-01 11:12:42 +0000
committernyamatongwe <devnull@localhost>2001-05-01 11:12:42 +0000
commit2bf292a604d2b8e2bb07be283d8ab0067f24a43b (patch)
tree2d1d090c6804a9af2f81f04c4554c22e819a1487 /src
parent581baaf98ebddddf0984b7b5bab90216069ac8b6 (diff)
downloadscintilla-mirror-2bf292a604d2b8e2bb07be283d8ab0067f24a43b.tar.gz
External lexer feature added by Simon allows lexers to be housed in DLLs with
a .lexer extension which are automatically loaded at startup. Minor fix to IME support in ScintillaWin.cxx to deal with current mingw headers.
Diffstat (limited to 'src')
-rw-r--r--src/DocumentAccessor.h9
-rw-r--r--src/ScintillaBase.cxx3
-rw-r--r--src/ScintillaBase.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/src/DocumentAccessor.h b/src/DocumentAccessor.h
index abbb55f18..48742a9b4 100644
--- a/src/DocumentAccessor.h
+++ b/src/DocumentAccessor.h
@@ -18,6 +18,7 @@ class DocumentAccessor : public Accessor {
protected:
Document *pdoc;
PropSet &props;
+ WindowID id;
int lenDoc;
char styleBuf[bufferSize];
@@ -30,8 +31,8 @@ protected:
void Fill(int position);
public:
- DocumentAccessor(Document *pdoc_, PropSet &props_) :
- Accessor(), pdoc(pdoc_), props(props_),
+ DocumentAccessor(Document *pdoc_, PropSet &props_, WindowID id_=0) :
+ Accessor(), pdoc(pdoc_), props(props_), id(id_),
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
}
~DocumentAccessor();
@@ -46,6 +47,10 @@ public:
int GetPropertyInt(const char *key, int defaultValue=0) {
return props.GetInt(key, defaultValue);
}
+ char *GetProperties() {
+ return props.ToString();
+ }
+ WindowID GetWindow() { return id; }
void StartAt(unsigned int start, char chMask=31);
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; };
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index fe873b0f2..2840e08fb 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -41,6 +41,7 @@ ScintillaBase::ScintillaBase() {
lexCurrent = 0;
for (int wl = 0;wl < numWordLists;wl++)
keyWordLists[wl] = new WordList;
+ keyWordLists[numWordLists] = 0;
#endif
}
@@ -362,7 +363,7 @@ void ScintillaBase::Colourise(int start, int end) {
int len = end - start;
//WindowAccessor styler(wMain.GetID(), props);
- DocumentAccessor styler(pdoc, props);
+ DocumentAccessor styler(pdoc, props, wMain.GetID());
int styleStart = 0;
if (start > 0)
diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h
index 13172031a..d5b1e8ba0 100644
--- a/src/ScintillaBase.h
+++ b/src/ScintillaBase.h
@@ -43,7 +43,7 @@ protected:
LexerModule *lexCurrent;
PropSet props;
enum {numWordLists=5};
- WordList *keyWordLists[numWordLists];
+ WordList *keyWordLists[numWordLists+1];
void SetLexer(uptr_t wParam);
void SetLexerLanguage(const char *languageName);
void Colourise(int start, int end);