[gnome-builder] gjs-symbols: Fix indexing offset



commit d74c0fff2eb750eaccbef2c2bb99423a8019d67d
Author: Patrick Griffis <tingping tingping se>
Date:   Tue Sep 12 20:07:35 2017 -0400

    gjs-symbols: Fix indexing offset
    
    For some reason it is exactly one off of the symbol tree offsets

 plugins/gjs-symbols/gjs_symbols.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/gjs-symbols/gjs_symbols.py b/plugins/gjs-symbols/gjs_symbols.py
index 59e1a61..a2ba59f 100644
--- a/plugins/gjs-symbols/gjs_symbols.py
+++ b/plugins/gjs-symbols/gjs_symbols.py
@@ -354,8 +354,8 @@ class GjsCodeIndexer(Ide.Object, Ide.CodeIndexer):
                 name=self._get_node_name(node),
                 kind=node.props.kind,
                 flags=node.props.flags,
-                begin_line=node.props.line,
-                begin_line_offset=node.props.col,
+                begin_line=node.props.line + 1,  # Not sure why offset here doesn't match tree
+                begin_line_offset=node.props.col + 1,
             )
             entries.append(entry)
         return JsCodeIndexEntries(entries)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]