Skip to content

Commit

Permalink
Some bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
qtc-de committed Sep 2, 2020
1 parent 7ed62e5 commit 07bfad4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
16 changes: 13 additions & 3 deletions autoload/vve/encode.vim
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,19 @@ function! vve#encode#VisualEncodeXml(type)
endfunction


function! vve#encode#VisualEncodeXmlFull(type)
call vve#encode#Dispatch('encode_xml_full', a:type)
endfunction


function! vve#encode#VisualDecodeXml(type)
call vve#encode#Dispatch('decode_xml', a:type)
endfunction
endfunction


function! vve#encode#VisualDecodeXmlFull(type)
call vve#encode#Dispatch('decode_xml_full', a:type)
endfunction


function! vve#encode#VisualEncodeHtml(type)
Expand All @@ -187,12 +197,12 @@ endfunction

function! vve#encode#VisualDecodeHtml(type)
call vve#encode#Dispatch('decode_html', a:type)
endfunction
endfunction


function! vve#encode#VisualDecodeHtmlFull(type)
call vve#encode#Dispatch('decode_html_full', a:type)
endfunction
endfunction


function! vve#encode#VisualEncodeBase64FromAscii(type)
Expand Down
6 changes: 3 additions & 3 deletions plugin/vve.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nnoremap <leader>eH :set operatorfunc=vve#encode#VisualEncodeHexString<CR>g@
nnoremap <leader>eu :set operatorfunc=vve#encode#VisualEncodeURL<CR>g@
nnoremap <leader>eU :set operatorfunc=vve#encode#VisualEncodeURLFull<CR>g@
nnoremap <leader>ex :set operatorfunc=vve#encode#VisualEncodeXml<CR>g@
nnoremap <leader>eX :set operatorfunc=vve#encode#VisualEncodeXml<CR>g@
nnoremap <leader>eX :set operatorfunc=vve#encode#VisualEncodeXmlFull<CR>g@
nnoremap <leader>da :set operatorfunc=vve#encode#VisualDecodeAscii<CR>g@
nnoremap <leader>db :set operatorfunc=vve#encode#VisualDecodeBinary<CR>g@
Expand Down Expand Up @@ -74,7 +74,7 @@ vnoremap <leader>eH :<c-u>call vve#encode#VisualEncodeHexString(visualmode())<CR
vnoremap <leader>eu :<c-u>call vve#encode#VisualEncodeURL(visualmode())<CR>
vnoremap <leader>eU :<c-u>call vve#encode#VisualEncodeURLFull(visualmode())<CR>
vnoremap <leader>ex :<c-u>call vve#encode#VisualEncodeXml(visualmode())<CR>
vnoremap <leader>eX :<c-u>call vve#encode#VisualEncodeXml(visualmode())<CR>
vnoremap <leader>eX :<c-u>call vve#encode#VisualEncodeXmlFull(visualmode())<CR>
vnoremap <leader>da :<c-u>call vve#encode#VisualDecodeAscii(visualmode())<CR>
vnoremap <leader>db :<c-u>call vve#encode#VisualDecodeBinary(visualmode())<CR>
Expand Down Expand Up @@ -111,7 +111,7 @@ vnoremap <leader>Dx :<c-u>call vve#encode#VisualDecodeXmlFullToAscii(visualmode(
vnoremap <leader>DX :<c-u>call vve#encode#VisualDecodeXmlFullToAscii(visualmode())<CR>

" number conversion :<c-u>call and inplace arithmetic
" number conversion and inplace arithmetic
nnoremap <leader>th :set operatorfunc=vve#numbers#VisualToHex<CR>g@
nnoremap <leader>tH :set operatorfunc=vve#numbers#VisualToHexString<CR>g@
nnoremap <leader>tb :set operatorfunc=vve#numbers#VisualToBin<CR>g@
Expand Down
4 changes: 2 additions & 2 deletions python/vve/encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ def decode_xml(string):
return xml.sax.saxutils.unescape(string)


def decode_xml_full(string):
def decode_xml_full(string, raw=False):
'''
Currently just the same as decode_html_full
'''
return decode_html_full(string)
return decode_html_full(string, raw)


def encode_ascii(data):
Expand Down

0 comments on commit 07bfad4

Please sign in to comment.