@@ -11,7 +11,7 @@ let s:previous_buffer = ''
1111let s: positions = [' top' , ' bottom' , ' left' , ' right' , ' tab' ]
1212let s: default_position = ' bottom'
1313
14- func ! executor#exec (start_line, end_line, open_result, ... )
14+ func ! executor#exec (start_line, end_line, open_result, ... ) abort
1515 if ! exists (' g:loaded_buffr' )
1616 call s: show_error (' Please, install vim-buffr plugin first' ) | return
1717 endif
@@ -23,23 +23,23 @@ func! executor#exec(start_line, end_line, open_result, ...)
2323 call executor#async#exec (l: command , l: selection , a: open_result )
2424 else
2525 call executor#default#exec (l: command , l: selection , a: open_result )
26- end
26+ endif
2727endfunc
2828
29- func ! executor#open_result (result, command )
29+ func ! executor#open_result (result, command ) abort
3030 let l: buffer_name = s: buffer_name (a: command )
3131 call s: open_buffer (l: buffer_name )
3232 call append (0 , a: result )
3333 silent normal ! Gddgg
3434endfunc
3535
36- func ! s: open_buffer (buffer_name)
36+ func ! s: open_buffer (buffer_name) abort
3737 let l: buffer_name = a: buffer_name
3838
3939 if g: executor_reuse_buffer
4040 if len (s: previous_buffer )
4141 let l: buffer_name = s: previous_buffer
42- end
42+ endif
4343 let s: previous_buffer = a: buffer_name
4444 endif
4545
@@ -54,7 +54,7 @@ func! s:open_buffer(buffer_name)
5454 endif
5555endfunc
5656
57- func ! s: buffer_name (command )
57+ func ! s: buffer_name (command ) abort
5858 let l: name = g: executor_buffer_name
5959 let l: name = substitute (l: name , ' {command}' , a: command , ' g' )
6060 let l: name = substitute (l: name , ' {filename}' , expand (' %:t' ), ' g' )
@@ -63,15 +63,11 @@ func! s:buffer_name(command)
6363 return l: name
6464endfunc
6565
66- func ! s: buffer_position ()
67- if index (s: positions , g: executor_position ) < 0
68- return s: default_position
69- else
70- return g: executor_position
71- endif
66+ func ! s: buffer_position () abort
67+ return index (s: positions , g: executor_position ) < 0 ? s: default_position : g: executor_position
7268endfunc
7369
74- func ! s: set_buffer_defaults ()
70+ func ! s: set_buffer_defaults () abort
7571 setlocal buftype = nofile
7672 setlocal bufhidden = wipe
7773 setlocal nobuflisted
0 commit comments