[gtk/wip/carlosg/fix-surrounding-text] imwayland: Fix typo in code
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/fix-surrounding-text] imwayland: Fix typo in code
- Date: Wed, 18 Mar 2020 16:03:26 +0000 (UTC)
commit 965a85a0d35c8026fd9d8ed0e2d674752b5bd0ba
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Mar 18 16:59:58 2020 +0100
imwayland: Fix typo in code
To find the middle of the string, we should check both cursor/anchor.
This is actually a backport of commit 8fc360dac5e4 in master.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2522
modules/input/imwayland.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/modules/input/imwayland.c b/modules/input/imwayland.c
index 821f2f678c..1d7fdba8cc 100644
--- a/modules/input/imwayland.c
+++ b/modules/input/imwayland.c
@@ -320,7 +320,7 @@ notify_surrounding_text (GtkIMContextWayland *context)
}
mid = MIN (context->surrounding.cursor_idx,
- context->surrounding.cursor_idx) + (cursor_len / 2);
+ context->surrounding.anchor_idx) + (cursor_len / 2);
a = MAX (0, mid - (MAX_LEN / 2));
b = MIN (MAX_LEN, mid + (MAX_LEN / 2));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]