On Tue, 2026-01-20 at 06:07 +0000, Koji Yokota wrote:
> commit f877ff85b8995575e2229ed15ecfc014fff3e840
> Author: Koji Yokota <[email protected]>
> Date:   Tue Jan 20 12:42:39 2026 +0900
> 
>     Let the input method instance recognise BufferView change
> ---
>  src/frontends/qt/GuiInputMethod.cpp | 8 ++++++++
>  src/frontends/qt/GuiInputMethod.h   | 1 +
>  2 files changed, 9 insertions(+)
> 
> diff --git a/src/frontends/qt/GuiInputMethod.cpp
> b/src/frontends/qt/GuiInputMethod.cpp
> index b9348328d9..f8eef39f39 100644
> --- a/src/frontends/qt/GuiInputMethod.cpp
> +++ b/src/frontends/qt/GuiInputMethod.cpp
> @@ -111,6 +111,8 @@ GuiInputMethod::GuiInputMethod(GuiWorkArea *parent)
>               this, &GuiInputMethod::onLocaleChanged);
>       connect(this, &GuiInputMethod::cursorPositionChanged,
>               this, &GuiInputMethod::onCursorPositionChanged);
> +     connect(parent, &GuiWorkArea::bufferViewChanged,
> +             this, &GuiInputMethod::onBufferViewChanged);
>  
>       // initialize locale status
>       onLocaleChanged();
> @@ -328,6 +330,12 @@ void GuiInputMethod::onCursorPositionChanged()
>       setSurroundingText(*d->cur_);
>  }
>  
> +void GuiInputMethod::onBufferViewChanged()
> +{
> +     d->buffer_view_ = &d->work_area_->bufferView();
> +     d->cur_ = &d->buffer_view_->cursor();
> +}
> +
>  
>  void GuiInputMethod::setPreeditStyle(
>               const QList<QInputMethodEvent::Attribute> & attr)
> diff --git a/src/frontends/qt/GuiInputMethod.h
> b/src/frontends/qt/GuiInputMethod.h
> index de107c92dc..d052e82ed3 100644
> --- a/src/frontends/qt/GuiInputMethod.h
> +++ b/src/frontends/qt/GuiInputMethod.h
> @@ -134,6 +134,7 @@ public Q_SLOTS:
>       /// Handles the localeChanged() signal the input method emits
>       void onLocaleChanged();
>       void onCursorPositionChanged();
> +     void onBufferViewChanged();
>  #ifdef Q_DEBUG
>       ///
>       void setHint(InputMethod::Hint hint) override;

Should not this go in the main branch as well?

Best regards,
-- 
José Abílio
-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to