From 3972d3b5910ecf67e04a431c9fffd57080687c65 Mon Sep 17 00:00:00 2001 From: lee Date: Tue, 24 May 2022 11:16:45 +0800 Subject: [PATCH] fix chinese input can't delete the last one character --- .../chromeos-pinyin/chromeos-pinyin-1.0.0.0.ebuild | 1 + .../fix-chinese-backspace-issue.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 app-i18n/chromeos-pinyin/fix-chinese-backspace-issue.patch diff --git a/app-i18n/chromeos-pinyin/chromeos-pinyin-1.0.0.0.ebuild b/app-i18n/chromeos-pinyin/chromeos-pinyin-1.0.0.0.ebuild index ee864cd..042f7f1 100644 --- a/app-i18n/chromeos-pinyin/chromeos-pinyin-1.0.0.0.ebuild +++ b/app-i18n/chromeos-pinyin/chromeos-pinyin-1.0.0.0.ebuild @@ -15,6 +15,7 @@ KEYWORDS="*" S="${WORKDIR}" src_prepare () { + epatch "${FILESDIR}"/fix-chinese-backspace-issue.patch cp -r ${FILESDIR}/chromeos-pinyin ${S} } diff --git a/app-i18n/chromeos-pinyin/fix-chinese-backspace-issue.patch b/app-i18n/chromeos-pinyin/fix-chinese-backspace-issue.patch new file mode 100644 index 0000000..f01ce4c --- /dev/null +++ b/app-i18n/chromeos-pinyin/fix-chinese-backspace-issue.patch @@ -0,0 +1,13 @@ +diff --git a/app-i18n/chromeos-pinyin/files/chromeos-pinyin/cros_background.js b/app-i18n/chromeos-pinyin/files/chromeos-pinyin/cros_background.js +index b3e6a70..6610687 100644 +--- a/app-i18n/chromeos-pinyin/files/chromeos-pinyin/cros_background.js ++++ b/app-i18n/chromeos-pinyin/files/chromeos-pinyin/cros_background.js +@@ -336,7 +336,7 @@ goog.ime.chrome.os.Model.prototype.enableUserDict=function(a,b){a=this.configFac + goog.ime.chrome.os.Model.prototype.updateSource=function(a){var b=this;return $jscomp.executeAsyncGenerator(function(){function c(c,e){for(;;)switch(d){case 0:return b.source.length+a.length>b.configFactory.getCurrentConfig().maxInputLen&&b.selectCandidate(void 0,""),b.source+=a,b.highlightIndex=-1,b.status==goog.ime.chrome.os.Status.INIT&&b.dispatchEvent(goog.ime.chrome.os.EventType.OPENING),b.dispatchEvent(goog.ime.chrome.os.EventType.MODELUPDATED),b.status==goog.ime.chrome.os.Status.SELECT&&(b.holdSelectStatus_= + !0),d=1,{value:b.fetchCandidates_(),done:!1};case 1:if(void 0===e){d=2;break}d=-1;throw e;case 2:d=-1;default:return{value:void 0,done:!0}}}var d=0,e={next:function(a){return c(a,void 0)},throw:function(a){return c(void 0,a)},return:function(a){throw Error("Not yet implemented");}};$jscomp.initSymbolIterator();e[Symbol.iterator]=function(){return this};return e}())}; + goog.ime.chrome.os.Model.prototype.revert=function(){var a=this;return $jscomp.executeAsyncGenerator(function(){function b(b,e){for(;;)switch(c){case 0:if(a.status==goog.ime.chrome.os.Status.FETCHING){c=1;break}a.status==goog.ime.chrome.os.Status.SELECT&&(a.holdSelectStatus_=!0);d="";if(0