From 87211a07fd664dcf88f35d374a0092ce0d997c8f Mon Sep 17 00:00:00 2001 From: syngan Date: Fri, 6 Sep 2013 22:37:38 +0900 Subject: [PATCH] fix vimlint error: remove unused variables fix syntax errors --- autoload/vimshell/commands/iexe.vim | 3 +-- autoload/vimshell/commands/popd.vim | 1 - autoload/vimshell/commands/view.vim | 2 +- autoload/vimshell/commands/whereis.vim | 1 - autoload/vimshell/complete.vim | 1 - autoload/vimshell/int_mappings.vim | 1 - autoload/vimshell/mappings.vim | 2 +- 7 files changed, 3 insertions(+), 8 deletions(-) diff --git a/autoload/vimshell/commands/iexe.vim b/autoload/vimshell/commands/iexe.vim index b70df895..722fda13 100644 --- a/autoload/vimshell/commands/iexe.vim +++ b/autoload/vimshell/commands/iexe.vim @@ -181,7 +181,7 @@ function! s:command.complete(args) "{{{ elseif vimshell#util#is_windows() && \ len(a:args) > 1 && a:args[1] == 'fakecygpty' return vimshell#complete#helper#executables( - \ a:args[-1], g:vimshell_interactive_cygwin_path) : + \ a:args[-1], g:vimshell_interactive_cygwin_path) endif return vimshell#complete#helper#args(a:args[1], a:args[2:]) @@ -340,7 +340,6 @@ function! vimshell#commands#iexe#init(context, interactive, new_pos, old_pos, is " Set send buffer. call vimshell#interactive#set_send_buffer(bufnr('%')) - let bufnr = bufnr('%') call vimshell#restore_pos(a:old_pos) if get(a:context, 'is_single_command', 0) diff --git a/autoload/vimshell/commands/popd.vim b/autoload/vimshell/commands/popd.vim index d5fede34..e412c90e 100644 --- a/autoload/vimshell/commands/popd.vim +++ b/autoload/vimshell/commands/popd.vim @@ -38,7 +38,6 @@ function! s:command.execute(args, context) "{{{ return endif - let cnt = 0 let arguments = join(a:args) if arguments =~ '^\d\+$' let pop = str2nr(arguments) diff --git a/autoload/vimshell/commands/view.vim b/autoload/vimshell/commands/view.vim index 79c236be..5bfcdcf3 100644 --- a/autoload/vimshell/commands/view.vim +++ b/autoload/vimshell/commands/view.vim @@ -38,7 +38,7 @@ function! s:command.execute(args, context) "{{{ if empty(args) if a:context.fd.stdin == '' - vimshell#error_line(a:context.fd, 'view: Filename required.') + call vimshell#error_line(a:context.fd, 'view: Filename required.') return endif diff --git a/autoload/vimshell/commands/whereis.vim b/autoload/vimshell/commands/whereis.vim index 835c437c..dbb08f5f 100644 --- a/autoload/vimshell/commands/whereis.vim +++ b/autoload/vimshell/commands/whereis.vim @@ -34,7 +34,6 @@ function! s:command.execute(args, context) "{{{ return endif - let name = a:args[0] for arg in vimproc#get_command_name(a:args[0], $PATH, -1) call vimshell#print_line(a:context.fd, arg) endfor diff --git a/autoload/vimshell/complete.vim b/autoload/vimshell/complete.vim index 00fec30b..b3c162fa 100644 --- a/autoload/vimshell/complete.vim +++ b/autoload/vimshell/complete.vim @@ -89,7 +89,6 @@ function! vimshell#complete#gather_candidates(complete_str) "{{{ if empty(args) let args = [''] endif - let cur_keyword_str = args[-1] let _ = (len(args) <= 1) ? \ s:get_complete_commands(a:complete_str) : diff --git a/autoload/vimshell/int_mappings.vim b/autoload/vimshell/int_mappings.vim index 2756971a..64e04bd8 100644 --- a/autoload/vimshell/int_mappings.vim +++ b/autoload/vimshell/int_mappings.vim @@ -244,7 +244,6 @@ function! s:restart_command() "{{{ endfunction"}}} function! vimshell#int_mappings#command_complete() "{{{ let prompt = vimshell#interactive#get_prompt() - let command = b:interactive.command let cur_text = vimshell#interactive#get_cur_text() call setline('.', prompt) let prompt_linenr = line('.') diff --git a/autoload/vimshell/mappings.vim b/autoload/vimshell/mappings.vim index 93fb3528..ee74279e 100644 --- a/autoload/vimshell/mappings.vim +++ b/autoload/vimshell/mappings.vim @@ -244,7 +244,7 @@ function! vimshell#mappings#execute_line(is_insert) "{{{ call vimshell#interactive#execute_pty_inout(a:is_insert) try - let ret = vimshell#parser#execute_continuation(a:is_insert) + call vimshell#parser#execute_continuation(a:is_insert) catch " Error. if v:exception !~# '^Vim\%((\a\+)\)\?:Interrupt'