[vte/vte-0-44] widget: Move IM cursor to the right position in im_update_cursor()



commit 6d91ca041d9a49d8c06d17e11785f5052817eea1
Author: Takao Fujiwara <tfujiwar redhat com>
Date:   Mon Mar 14 18:10:09 2016 +0100

    widget: Move IM cursor to the right position in im_update_cursor()
    
    IM cursor is moved with pre-edit text.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756141
    (cherry picked from commit 656530adcba25745e250de6d73ce40310c1c4d4c)

 src/vte.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 4c62dbf..cf052be 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -4666,7 +4666,8 @@ VteTerminalPrivate::im_update_cursor()
                 return;
 
         cairo_rectangle_int_t rect;
-        rect.x = m_screen->cursor.col * m_char_width + m_padding.left;
+        rect.x = m_screen->cursor.col * m_char_width + m_padding.left +
+                 get_preedit_width(false) * m_char_width;
         rect.width = m_char_width; // FIXMEchpe: if columns > 1 ?
         rect.y = row_to_pixel(m_screen->cursor.row) + m_padding.top;
         rect.height = m_char_height;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]