From 7cb2d33039f757ec3030055824f2069112486617 Mon Sep 17 00:00:00 2001 From: Trung Ngo Date: Wed, 8 Apr 2015 17:40:22 +0700 Subject: [PATCH] Reenable support for surrounding text --- main.vala | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/main.vala b/main.vala index 8c1c0c8..da203d7 100644 --- a/main.vala +++ b/main.vala @@ -165,16 +165,15 @@ public class BogoIMContext : Gtk.IMContext { debug(@"delete($count)"); - delete_with_backspace(count); - // if (is_app_blacklisted()) { - // delete_with_backspace(count); - // } else { - // var deleted = delete_surrounding(-(int) count, (int) count); - // if (!deleted) { - // debug("delete_surrounding() failed."); - // delete_with_backspace(count); - // } - // } + if (is_app_blacklisted()) { + delete_with_backspace(count); + } else { + var deleted = delete_surrounding(-(int) count, (int) count); + if (!deleted) { + debug("delete_surrounding() failed."); + delete_with_backspace(count); + } + } } private void delete_with_backspace(uint count) {