From 9ed4211f1ff5d13a0a8b9fe301063b603e4f2c8e Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 2 Oct 2014 23:10:05 +1000 Subject: Allocate indicators for IME use after previously allowed indicators. --- doc/ScintillaDoc.html | 10 ++++++---- include/Scintilla.h | 4 +++- include/Scintilla.iface | 4 +++- src/Decoration.cxx | 4 +++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 04528b35e..648615821 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -82,7 +82,7 @@

Scintilla Documentation

-

Last edited 25 September 2014 NH

+

Last edited 2 October 2014 NH

There is an overview of the internal design of Scintilla.
@@ -3890,10 +3890,11 @@ struct Sci_TextToFind { line of small 'T' shapes, a line of diagonal hatching, a strike-out or a rectangle around the text.

The SCI_INDIC* messages allow you to get and set the visual appearance of the - indicators. They all use an indicatorNumber argument in the range 0 to INDIC_MAX(31) + indicators. They all use an indicatorNumber argument in the range 0 to INDIC_MAX(35) to set the indicator to style. To prevent interference the set of indicators is divided up into a range for use - by lexers (0..7) and a range for use by containers - (8=INDIC_CONTAINER .. 31=INDIC_MAX).

+ by lexers (0..7) a range for use by containers + (8=INDIC_CONTAINER .. 31=INDIC_IME-1) + and a range for IME indicators (32=INDIC_IME .. 35=INDIC_IME_MAX).

Originally, Scintilla used a different technique for indicators but this has been removed @@ -4155,6 +4156,7 @@ struct Sci_TextToFind {

SCI_INDICATORALLONFOR(int position)
Retrieve a bitmap value representing which indicators are non-zero at a position. + Only the first 32 indicators are represented in the result so no IME indicators are included.

diff --git a/include/Scintilla.h b/include/Scintilla.h index 154f57010..b972512c3 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -274,7 +274,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define INDIC_DOTBOX 12 #define INDIC_SQUIGGLEPIXMAP 13 #define INDIC_COMPOSITIONTHICK 14 -#define INDIC_MAX 31 +#define INDIC_IME 32 +#define INDIC_IME_MAX 35 +#define INDIC_MAX 35 #define INDIC_CONTAINER 8 #define INDIC0_MASK 0x20 #define INDIC1_MASK 0x40 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index f93ae23c2..bfbffd878 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -605,7 +605,9 @@ val INDIC_SQUIGGLELOW=11 val INDIC_DOTBOX=12 val INDIC_SQUIGGLEPIXMAP=13 val INDIC_COMPOSITIONTHICK=14 -val INDIC_MAX=31 +val INDIC_IME=32 +val INDIC_IME_MAX=35 +val INDIC_MAX=35 val INDIC_CONTAINER=8 val INDIC0_MASK=0x20 val INDIC1_MASK=0x40 diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 72c7a331f..e7610e0b6 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -163,7 +163,9 @@ int DecorationList::AllOnFor(int position) const { int mask = 0; for (Decoration *deco=root; deco; deco = deco->next) { if (deco->rs.ValueAt(position)) { - mask |= 1 << deco->indicator; + if (deco->indicator < INDIC_IME) { + mask |= 1 << deco->indicator; + } } } return mask; -- cgit v1.2.3