diff options
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 2 | ||||
| -rw-r--r-- | include/Scintilla.h | 38 | ||||
| -rw-r--r-- | src/Document.cxx | 8 | ||||
| -rw-r--r-- | src/DocumentAccessor.cxx | 13 | 
4 files changed, 34 insertions, 27 deletions
| diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index f150a9297..73dfb9581 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -864,7 +864,7 @@ static int KeyTranslate(int keyIn) {  }  gint ScintillaGTK::KeyPress(GtkWidget *, GdkEventKey *event, ScintillaGTK *sciThis) { -	//Platform::DebugPrintf("SC-key: %d %x %x\n",event->keyval, event->state, GTK_WIDGET_FLAGS(widget)); +	//Platform::DebugPrintf("SC-key: %d %x %x\n",event->keyval, event->state);  	bool shift = event->state & GDK_SHIFT_MASK;  	bool ctrl = event->state & GDK_CONTROL_MASK;  	bool alt = event->state & GDK_MOD1_MASK; diff --git a/include/Scintilla.h b/include/Scintilla.h index b354875f1..e2c062378 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -540,28 +540,30 @@ struct SCNotification {  #define SCFIND_DOWN 1  // Symbolic key codes - -#define SCK_DOWN 40 -#define SCK_UP 38 -#define SCK_LEFT 37 -#define SCK_RIGHT 39 -#define SCK_HOME 36 -#define SCK_END 35 -#define SCK_PRIOR 33 -#define SCK_NEXT 34 -#define SCK_DELETE 46 -#define SCK_INSERT 45 -#define SCK_ESCAPE 27 +// ASCII and other printable characters below 256 +// Extended keys above 300 + +#define SCK_DOWN 300 +#define SCK_UP 301 +#define SCK_LEFT 302 +#define SCK_RIGHT 202 +#define SCK_HOME 304 +#define SCK_END 305 +#define SCK_PRIOR 306 +#define SCK_NEXT 307 +#define SCK_DELETE 308 +#define SCK_INSERT 309 +#define SCK_ESCAPE 7  #define SCK_BACK 8  #define SCK_TAB 9  #define SCK_RETURN 13 -#define SCK_ADD 107 -#define SCK_SUBTRACT 109 -#define SCK_DIVIDE 111 +#define SCK_ADD 310 +#define SCK_SUBTRACT 311 +#define SCK_DIVIDE 312 -#define SCMOD_SHIFT 16 -#define SCMOD_CTRL 8 -#define SCMOD_ALT 2 +#define SCMOD_SHIFT 1 +#define SCMOD_CTRL 2 +#define SCMOD_ALT 4  // Deprecation section listing all API features that are deprecated and will diff --git a/src/Document.cxx b/src/Document.cxx index b6b875c66..f8d349adb 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -201,8 +201,8 @@ bool Document::IsCrLf(int pos) {  	return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n');  } -bool Document::IsDBCS(int pos) {  #if PLAT_WIN +bool Document::IsDBCS(int pos) {  	if (dbcsCodePage) {  		if (SC_CP_UTF8 == dbcsCodePage) {  			unsigned char ch = static_cast<unsigned char>(cb.CharAt(pos)); @@ -224,10 +224,14 @@ bool Document::IsDBCS(int pos) {  		}  	}  	return false; +}  #else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool Document::IsDBCS(int) {  	return false; -#endif  } +#endif  int Document::LenChar(int pos) {  	if (IsCrLf(pos)) { diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx index d3811b77c..6828e37c3 100644 --- a/src/DocumentAccessor.cxx +++ b/src/DocumentAccessor.cxx @@ -21,21 +21,22 @@  DocumentAccessor::~DocumentAccessor() {  } +#if PLAT_WIN   bool DocumentAccessor::InternalIsLeadByte(char ch) { -#if PLAT_GTK -	// TODO: support DBCS under GTK+ -	return false; -#elif PLAT_WIN   	if (SC_CP_UTF8 == codePage)  		// For lexing, all characters >= 0x80 are treated the  		// same so none is considered a lead byte.  		return false;	  	else  		return IsDBCSLeadByteEx(codePage, ch); -#elif PLAT_WX  +} +#else +// PLAT_GTK or PLAT_WX +// TODO: support DBCS under GTK+ and WX +bool DocumentAccessor::InternalIsLeadByte(char) {  	return false; -#endif   } +#endif   void DocumentAccessor::Fill(int position) {  	if (lenDoc == -1) | 
