1
0
Fork 0

Now works with unsaved files

pull/250/head
Ivan Bozhanov 2017-01-20 17:33:04 +02:00
parent 8fbbf3d064
commit d433ae4ed0
1 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,10 @@ class SignatureHelpProvider
$help = new SignatureHelp;
$help->signatures = [];
$handle = fopen($doc->getUri(), 'r');
$handle = fopen('php://temp', 'r+');
fwrite($handle, $doc->getContent());
fseek($handle, 0);
$lines = [];
for ($i = 0; $i < $pos->line; $i++) {
$lines[] = strlen(fgets($handle));