commit:     94a6935d5f79eca9fe649e927cfdcdd3c68995ff
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 28 06:10:44 2024 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Sun Apr 28 06:10:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94a6935d

app-text/cmigemo: fix vim plugin

Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>

 app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch | 26 +++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch 
b/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch
index 74c5f17b9c78..daf9c18e9157 100644
--- a/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch
+++ b/app-text/cmigemo/files/cmigemo-1.3c-gentoo.patch
@@ -54,9 +54,33 @@
  else
    " non-builtin version
 -  let g:migemodict = s:SearchDict()
-+  if !exists('g:migemodict')
++  if !get(g:, 'migemodict')
 +    let g:migemodict = s:SearchDict()
 +  endif
    command! -nargs=* Migemo :call <SID>MigemoSearch(<q-args>)
    nnoremap <silent> <leader>mi :call <SID>MigemoSearch('')<cr>
  
+@@ -53,11 +55,6 @@
+       if retval == ''
+         return
+       endif
+-      if has('iconv') && $HOMEDRIVE != ''
+-        let retval = iconv(retval, 'cp932', 'euc-jp')
+-      elseif &encoding != 'euc-jp'
+-        let retval = iconv(retval, &encoding, 'euc-jp')
+-      endif
+       "let retval = system('cmigemo -v -w "'.retval.'" -d "'.g:migemodict.'"')
+       let retval = system('cmigemo -v -w '.retval.' -d "'.g:migemodict.'"')
+       if retval == ''
+@@ -88,11 +85,6 @@
+       echohl None
+       return
+     endif
+-    if has('iconv') && $HOMEDRIVE != ''
+-      let retval = iconv(retval, 'euc-jp', 'cp932')
+-    elseif &encoding != 'euc-jp'
+-      let retval = iconv(retval, 'euc-jp', &encoding)
+-    endif
+   
+     let @/ = retval
+     let v:errmsg = ''

Reply via email to