Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Try to fix issue #297.

At least it doesn't crash anymore for me. It seems to be an off by one.
Strangely enough, TranslationUnit.reparse and
TranslationUnit.from_source are not affected, and when adding the "+ 1",
they do not behave correctly. Maybe it's a bug in libclang?
  • Loading branch information...
commit c48d35dcfe68e3526de706cc15e2a44977b99312 1 parent d14eb87
@Rip-Rip authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  plugin/clang/cindex.py
View
2  plugin/clang/cindex.py
@@ -2255,7 +2255,7 @@ def codeComplete(self, path, line, column, unsaved_files=None,
raise TypeError,'Unexpected unsaved file contents.'
unsaved_files_array[i].name = name
unsaved_files_array[i].contents = value
- unsaved_files_array[i].length = len(value)
+ unsaved_files_array[i].length = len(value) + 1
ptr = conf.lib.clang_codeCompleteAt(self, path, line, column,
unsaved_files_array, len(unsaved_files), options)
if ptr:
Please sign in to comment.
Something went wrong with that request. Please try again.