Skip to content

Commit 5355688

Browse files
committed
completion: fix list-symbols pruning
Fix how list-symbols prunes local variables defined after the cursor
1 parent e6dbdb1 commit 5355688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/completion/completionengine.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ namespace Vls.CompletionEngine {
159159
var sr = sym.source_reference;
160160
if (sr == null)
161161
continue;
162-
var sr_begin = new Position () { line = sr.begin.line, character = sr.begin.column - 1 };
162+
var sr_begin = new Position.from_libvala (sr.begin);
163163

164164
// don't show local variables that are declared ahead of the cursor
165165
if (sr_begin.compare_to (pos) > 0)

0 commit comments

Comments
 (0)