fixed #584 (autocomplete problem)there were some problems with empty lines and missing line breaks at theend of the file.Positions were not calculated correctly in that case (commit: c022f4f)