Skip to content

Commit

Permalink
Use absolute paths for unsaved files. Fixes lyuts#120 part 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Vilim committed Oct 2, 2018
1 parent 6340bf5 commit 259f7b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/rtags.vim
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function! rtags#ExecuteRC(args)
let unsaved_content = join(getline(1, line('$')), "\n")
endif
if exists('unsaved_content')
let filename = expand("%")
let filename = expand("%:p")
let output = system(printf("%s --wait --unsaved-file=%s:%s -V %s", cmd, filename, strlen(unsaved_content), filename), unsaved_content)
let b:rtags_sent_content = unsaved_content
endif
Expand Down Expand Up @@ -712,7 +712,7 @@ function! rtags#ExecuteRCAsync(args, handlers)
let unsaved_content = join(getline(1, line('$')), "\n")
endif
if exists('unsaved_content')
let filename = expand("%")
let filename = expand("%:p")
let output = system(printf("%s --wait --unsaved-file=%s:%s -V %s", cmd, filename, strlen(unsaved_content), filename), unsaved_content)
let b:rtags_sent_content = unsaved_content
endif
Expand Down

0 comments on commit 259f7b6

Please sign in to comment.