From b378d1b217294387ab5925a21875c46c8dc04db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D1=88=D0=B0=20=D0=A7=D0=B5=D1=80=D0=BD=D1=8B?= =?UTF-8?q?=D1=85?= Date: Fri, 6 Jan 2017 21:02:48 +0300 Subject: [PATCH 1/2] [Fixed] #6 See [**LaryLee comment**](https://github.com/Nucc/Thesaurus/issues/6#issuecomment-164431209). It's worked for me. --- thesaurus.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thesaurus.py b/thesaurus.py index 57e5930..496b13f 100644 --- a/thesaurus.py +++ b/thesaurus.py @@ -78,7 +78,8 @@ def replace(self, value): value = re.subn(r'\(.*?\)$', "", value)[0] if value is not None: - self.view.replace(self.edit, self.region, value.strip().lower()) + self.view.run_command("insert", {"characters": value.strip().lower()}) + def synonyms(self): result = [] From 7facbb6c0f9ad5277306355d3214ec64434838ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D1=88=D0=B0=20=D0=A7=D0=B5=D1=80=D0=BD=D1=8B?= =?UTF-8?q?=D1=85?= Date: Fri, 6 Jan 2017 21:07:40 +0300 Subject: [PATCH 2/2] Fixed typo --- thesaurus.py | 1 - 1 file changed, 1 deletion(-) diff --git a/thesaurus.py b/thesaurus.py index 496b13f..aca693e 100644 --- a/thesaurus.py +++ b/thesaurus.py @@ -80,7 +80,6 @@ def replace(self, value): if value is not None: self.view.run_command("insert", {"characters": value.strip().lower()}) - def synonyms(self): result = [] try: