diff options
-rw-r--r-- | include/Scintilla.h | 7 | ||||
-rw-r--r-- | include/Scintilla.iface | 22 | ||||
-rw-r--r-- | src/Editor.cxx | 3 | ||||
-rw-r--r-- | src/ScintillaBase.cxx | 2 | ||||
-rw-r--r-- | test/lexTests.py | 4 |
5 files changed, 21 insertions, 17 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h index 37bcf146f..95d8b6957 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -320,8 +320,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_SETWHITESPACEBACK 2085 #define SCI_SETWHITESPACESIZE 2086 #define SCI_GETWHITESPACESIZE 2087 -#define SCI_SETSTYLEBITS 2090 -#define SCI_GETSTYLEBITS 2091 #define SCI_SETLINESTATE 2092 #define SCI_GETLINESTATE 2093 #define SCI_GETMAXLINESTATE 2094 @@ -988,7 +986,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETPROPERTY 4008 #define SCI_GETPROPERTYEXPANDED 4009 #define SCI_GETPROPERTYINT 4010 -#define SCI_GETSTYLEBITSNEEDED 4011 #define SCI_GETLEXERLANGUAGE 4012 #define SCI_PRIVATELEXERCALL 4013 #define SCI_PROPERTYNAMES 4014 @@ -1216,6 +1213,10 @@ struct SCNotification { #define RangeToFormat Sci_RangeToFormat #define NotifyHeader Sci_NotifyHeader +#define SCI_SETSTYLEBITS 2090 +#define SCI_GETSTYLEBITS 2091 +#define SCI_GETSTYLEBITSNEEDED 4011 + #endif #endif diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 9ba591168..69139158a 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -702,14 +702,6 @@ set void SetWhitespaceSize=2086(int size,) # Get the size of the dots used to mark space characters. get int GetWhitespaceSize=2087(,) -# Divide each styling byte into lexical class bits (default: 5) and indicator -# bits (default: 3). If a lexer requires more than 32 lexical states, then this -# is used to expand the possible states. -set void SetStyleBits=2090(int bits,) - -# Retrieve number of bits in style bytes used to hold the lexical state. -get int GetStyleBits=2091(,) - # Used to hold extra styling information for each line. set void SetLineState=2092(int line, int state) @@ -2638,9 +2630,6 @@ get int GetPropertyExpanded=4009(string key, stringresult value) # interpreted as an int AFTER any "$()" variable replacement. get int GetPropertyInt=4010(string key, int defaultValue) -# Retrieve the number of bits the current lexer needs for styling. -get int GetStyleBitsNeeded=4011(,) - # Retrieve the name of the lexer. # Return the length of the text. # Result is NUL-terminated. @@ -4875,6 +4864,17 @@ cat Provisional cat Deprecated +# Divide each styling byte into lexical class bits (default: 5) and indicator +# bits (default: 3). If a lexer requires more than 32 lexical states, then this +# is used to expand the possible states. +set void SetStyleBits=2090(int bits,) + +# Retrieve number of bits in style bytes used to hold the lexical state. +get int GetStyleBits=2091(,) + +# Retrieve the number of bits the current lexer needs for styling. +get int GetStyleBitsNeeded=4011(,) + # Deprecated in 3.5.5 # Always interpret keyboard input as Unicode diff --git a/src/Editor.cxx b/src/Editor.cxx index 93a157061..05796c7bf 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6971,12 +6971,15 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { vs.ResetDefaultStyle(); InvalidateStyleRedraw(); break; + +#ifdef INCLUDE_DEPRECATED_FEATURES case SCI_SETSTYLEBITS: vs.EnsureStyle(0xff); break; case SCI_GETSTYLEBITS: return 8; +#endif case SCI_SETLINESTATE: return pdoc->SetLineState(static_cast<int>(wParam), static_cast<int>(lParam)); diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index c0166c41b..378baad73 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -1092,8 +1092,10 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara return reinterpret_cast<sptr_t>( DocumentLexState()->PrivateCall(static_cast<int>(wParam), reinterpret_cast<void *>(lParam))); +#ifdef INCLUDE_DEPRECATED_FEATURES case SCI_GETSTYLEBITSNEEDED: return 8; +#endif case SCI_PROPERTYNAMES: return StringResult(lParam, DocumentLexState()->PropertyNames()); diff --git a/test/lexTests.py b/test/lexTests.py index 03d3d1cee..2dbb1b3ad 100644 --- a/test/lexTests.py +++ b/test/lexTests.py @@ -75,9 +75,7 @@ class TestLexers(unittest.TestCase): self.ed.EmptyUndoBuffer() self.ed.SetCodePage(65001) self.ed.LexerLanguage = lexerName - bits = self.ed.StyleBitsNeeded - mask = 2 << bits - 1 - self.ed.StyleBits = bits + mask = 0xff for i in range(len(keywords)): self.ed.SetKeyWords(i, keywords[i]) |