Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
alopatindev committed Dec 16, 2023
1 parent 1e5da93 commit f5534af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugin/cargo-limit.vim
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endf
fun! s:maybe_setup_handlers() abort
augroup CargoLimitAutocommands
autocmd!
autocmd VimLeavePre * call s:recreate_temp_sources_dir() " TODO: or just remove it?
autocmd VimLeavePre * call s:recreate_temp_sources_dir() " TODO: or just remove the dir?
autocmd BufWritePost *.rs call s:on_buffer_write()
augroup END

Expand Down Expand Up @@ -170,7 +170,7 @@ fun! s:copy_affected_files_to_temp() abort
endfor

for i in keys(l:paths)
call s:maybe_copy_to_temp(fnameescape(i))
call s:maybe_copy_to_temp(i)
endfor
endf

Expand Down Expand Up @@ -436,7 +436,6 @@ fun! s:recreate_temp_sources_dir() abort
endf

fun! s:temp_source_path(path) abort
"return s:temp_sources_dir . '/' . fnamemodify(a:path, ':t') " TODO
return s:temp_sources_dir . '/' . s:escape_path(a:path)
endf

Expand Down Expand Up @@ -470,7 +469,6 @@ endf

fun! s:jump_to_location(location_index) abort
let l:location = s:editor_data.locations[a:location_index]
" TODO: is fnameescape required here?
execute 'tab drop ' . fnameescape(l:location.path)
call cursor((l:location.line), (l:location.column))
endf
Expand Down

0 comments on commit f5534af

Please sign in to comment.