From 25b829a0ba90b6c8915b2f71a155e54dc20cb43a Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Mon, 6 Jan 2020 23:14:29 +1100 Subject: Backport: Bug [#2135]. Improve location of candidate window. Backport of changeset 7948:be6757890988. --- gtk/ScintillaGTK.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gtk/ScintillaGTK.cxx') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 144942fe8..5b0c9b940 100755 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2314,8 +2314,10 @@ void ScintillaGTK::SetCandidateWindowPos() { // Composition box accompanies candidate box. const Point pt = PointMainCaret(); GdkRectangle imeBox = {0}; // No need to set width - imeBox.x = static_cast(pt.x); // Only need positiion - imeBox.y = static_cast(pt.y) + vs.lineHeight; // underneath the first charater + imeBox.x = static_cast(pt.x); + imeBox.y = static_cast(pt.y + std::max(4, vs.lineHeight/4)); + // prevent overlapping with current line + imeBox.height = vs.lineHeight; gtk_im_context_set_cursor_location(im_context, &imeBox); } -- cgit v1.2.3