[LyX/master] Introducing OnTheSpot-style input method editing & IME integration

Pavel Sanda sanda at lyx.org
Thu Jan 23 16:05:46 UTC 2025


On Thu, Jan 23, 2025 at 12:29:13PM +0000, Koji Yokota wrote:
> commit b9c5f6be5ef617d4776abeeaec4c271410fedcc2
> Author: Koji Yokota <yokota at lyx.org>
> Date:   Thu Jan 23 18:52:51 2025 +0900
> 
>     Introducing OnTheSpot-style input method editing & IME integration
>     
>     OnTheSpot style of the input method editor (IME) shows preedit strings in the
>     same status as normal string inputs instead of showing it overlapping with
>     the main text. In doing so, the input method is more integrated with LyX
>     enabling e.g. automatic on/off of IME in the math editor or in the command mode.

Thanks Koji for your persistence.

Few comments:
- why is #include <array> needed in GuiWorkArea.cpp ?

- would you mind writing some description for users to
  lib/RELEASE-NOTES and https://wiki.lyx.org/LyX/NewInLyX25 ?
  If some pictures would be helpful I can upload them
  to wiki (or you can do directly via wiki-uploads.git).

- This is warning I see with gcc:
  CXX      Row.o
In file included from Row.cpp:19:
In copy constructor 'lyx::Row::Element::Element(const lyx::Row::Element&)',
    inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = lyx::Row::Element; _Args = {const lyx::Row::Element&}; _Tp = lyx::Row::Element]' at /usr/include/c++/12/bits/new_allocator.h:175:4,
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = lyx::Row::Element; _Args = {const lyx::Row::Element&}; _Tp = lyx::Row::Element]' at /usr/include/c++/12/bits/alloc_traits.h:516:17,
    inlined from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = lyx::Row::Element; _Alloc = std::allocator<lyx::Row::Element>]' at /usr/include/c++/12/bits/stl_vector.h:1281:30,
    inlined from 'void lyx::Row::addSpace(lyx::pos_type, int, const lyx::Font&, const lyx::Change&)' at Row.cpp:605:21:
Row.h:75:16: warning: 'e.lyx::Row::Element::char_format_index' may be used uninitialized [-Wmaybe-uninitialized]
   75 |         struct Element {
      |                ^~~~~~~
Row.cpp: In member function 'void lyx::Row::addSpace(lyx::pos_type, int, const lyx::Font&, const lyx::Change&)':
Row.cpp:603:17: note: 'e' declared here
  603 |         Element e(SPACE, pos, f, ch);
      |                 ^
In copy constructor 'lyx::Row::Element::Element(const lyx::Row::Element&)',
    inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = lyx::Row::Element; _Args = {const lyx::Row::Element&}; _Tp = lyx::Row::Element]' at /usr/include/c++/12/bits/new_allocator.h:175:4,
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = lyx::Row::Element; _Args = {const lyx::Row::Element&}; _Tp = lyx::Row::Element]' at /usr/include/c++/12/bits/alloc_traits.h:516:17,
    inlined from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = lyx::Row::Element; _Alloc = std::allocator<lyx::Row::Element>]' at /usr/include/c++/12/bits/stl_vector.h:1281:30,
    inlined from 'void lyx::Row::addMarginSpace(lyx::pos_type, int, const lyx::Font&, const lyx::Change&)' at Row.cpp:617:21:
Row.h:75:16: warning: 'e.lyx::Row::Element::char_format_index' may be used uninitialized [-Wmaybe-uninitialized]
   75 |         struct Element {
      |                ^~~~~~~
Row.cpp: In member function 'void lyx::Row::addMarginSpace(lyx::pos_type, int, const lyx::Font&, const lyx::Change&)':
Row.cpp:614:17: note: 'e' declared here
  614 |         Element e(MARGINSPACE, pos, f, ch);
      |                 ^
In copy constructor 'lyx::Row::Element::Element(const lyx::Row::Element&)',
    inlined from 'void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = lyx::Row::Element; _Args = {const lyx::Row::Element&}; _Tp = lyx::Row::Element]' at /usr/include/c++/12/bits/new_allocator.h:175:4,
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = lyx::Row::Element; _Args = {const lyx::Row::Element&}; _Tp = lyx::Row::Element]' at /usr/include/c++/12/bits/alloc_traits.h:516:17,
    inlined from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = lyx::Row::Element; _Alloc = std::allocator<lyx::Row::Element>]' at /usr/include/c++/12/bits/stl_vector.h:1281:30,
    inlined from 'void lyx::Row::add(lyx::pos_type, lyx::char_type, const lyx::Font&, const lyx::Change&)' at Row.cpp:555:22:
Row.h:75:16: warning: 'e.lyx::Row::Element::char_format_index' may be used uninitialized [-Wmaybe-uninitialized]
   75 |         struct Element {
      |                ^~~~~~~
Row.cpp: In member function 'void lyx::Row::add(lyx::pos_type, lyx::char_type, const lyx::Font&, const lyx::Change&)':
Row.cpp:553:25: note: 'e' declared here
  553 |                 Element e(STRING, pos, f, ch);
      |                         ^


Pavel


More information about the lyx-devel mailing list