diff options
author | 2018-11-25 01:08:21 -0500 | |
---|---|---|
committer | 2018-11-25 01:08:21 -0500 | |
commit | 82fe4c5665c0f4ee24c226314aae2edc39aae258 (patch) | |
tree | f8a6343a00930c3b531a88e0c5fd17133307d962 /src | |
parent | a0db06b907c8f480226e5758885a0590b29afdc7 (diff) |
Hijack `buffer:load_lexer_library()` to allow manual setting of input method.
Apparently Mac OSX 10.14 is causing problems with GTK-OSX's normal input method
switching.
The input methods available are in Textadept.app's Contents/Resources/etc/gtk-
2.0/gtk.immodules file. Use the first string identifier.
Diffstat (limited to 'src')
-rw-r--r-- | src/scintilla.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/scintilla.patch b/src/scintilla.patch index b3d0a727..64bbf629 100644 --- a/src/scintilla.patch +++ b/src/scintilla.patch @@ -36,6 +36,7 @@ Revert caret block placement change introduced by Scintilla 3.7.3. const int offset = static_cast<int>(posCaret.Position() - posLineStart); const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; const XYPOSITION virtualOffset = posCaret.VirtualSpace() * spaceWidth; +Temporary patch to send SC_UPDATE_SELECTION for multiple select. diff -r 6e368ee248e4 src/Editor.cxx --- a/src/Editor.cxx Fri Oct 26 11:06:34 2018 -0400 +++ b/src/Editor.cxx Sun Nov 04 09:06:53 2018 -0500 @@ -47,3 +48,24 @@ diff -r 6e368ee248e4 src/Editor.cxx ScrollRange(sel.RangeMain()); Redraw(); if (addNumber == addOne) +Hijack SCI_LOADLEXERLIBRARY for programmatically setting input method. +This is helpful on newer version of Mac OSX, where changing the input method is +flaky. +diff -r 6e368ee248e4 gtk/ScintillaGTK.cxx +--- a/gtk/ScintillaGTK.cxx Fri Oct 26 11:06:34 2018 -0400 ++++ b/gtk/ScintillaGTK.cxx Sun Nov 25 00:20:58 2018 -0500 +@@ -821,11 +821,11 @@ + case SCI_GETDIRECTPOINTER: + return reinterpret_cast<sptr_t>(this); + +-#ifdef SCI_LEXER + case SCI_LOADLEXERLIBRARY: +- LexerManager::GetInstance()->Load(ConstCharPtrFromSPtr(lParam)); ++ // Hijack this interface to programmatically set input method. ++ gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(im_context), ConstCharPtrFromSPtr(lParam)); + break; +-#endif ++ + case SCI_TARGETASUTF8: + return TargetAsUTF8(CharPtrFromSPtr(lParam)); + |