File bracketcompletion-use-key-release-event-to-work-wi.patch of Package gedit-plugins

From 7c2ce196a6bedeb903de840ca5416a06ca918b2b Mon Sep 17 00:00:00 2001
From: Peng Wu <alexepico@gmail.com>
Date: Tue, 6 Sep 2016 11:13:19 +0800
Subject: [PATCH] bracketcompletion: use key release event to work with input
 method

To work with ibus pinyin input method,
switch to use key release event.

https://bugzilla.gnome.org/show_bug.cgi?id=778737
---
 plugins/bracketcompletion/bracketcompletion.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/bracketcompletion/bracketcompletion.py b/plugins/bracketcompletion/bracketcompletion.py
index 9da57c9..451db2e 100644
--- a/plugins/bracketcompletion/bracketcompletion.py
+++ b/plugins/bracketcompletion/bracketcompletion.py
@@ -248,7 +248,7 @@ class BracketCompletionPlugin(GObject.Object, Gedit.ViewActivatable):
         return False
 
     def on_event_after(self, view, event):
-        if event.type != Gdk.EventType.KEY_PRESS or \
+        if event.type != Gdk.EventType.KEY_RELEASE or \
            event.state & (Gdk.ModifierType.CONTROL_MASK | Gdk.ModifierType.MOD1_MASK) or \
            event.keyval not in self._bracket_keyvals:
             return
-- 
2.9.3