Skip to content

Commit

Permalink
Fix Mismatch Message
Browse files Browse the repository at this point in the history
Create message from keycode.
  • Loading branch information
simeji committed Feb 21, 2016
1 parent f30c744 commit a60597a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion plugin/winresizer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fun! s:startReize(commands)

while 1

echo '[window resize mode]... "Enter": OK , "q": Cancel'
echo '[window resize mode]... "'.s:label_finish.'": OK , "'.s:label_cancel.'": Cancel'
let c = getchar()

if c == s:codeList['left'] "h
Expand Down Expand Up @@ -174,5 +174,19 @@ fun! s:getOppositeSign(sign)
return sign
endfun

fun! s:getKeyAlias(code)
if a:code == 13
let alias = "Enter"
elseif a:code == 32
let alias = "Space"
else
let alias = nr2char(a:code, 1)
end
return alias
endfun

let s:label_finish = s:getKeyAlias(g:winresizer_keycode_finish)
let s:label_cancel = s:getKeyAlias(g:winresizer_keycode_cancel)


let &cpo = s:save_cpo

0 comments on commit a60597a

Please sign in to comment.