Skip to content

Commit

Permalink
Correct completion starting point
Browse files Browse the repository at this point in the history
  • Loading branch information
ikappaki committed Apr 22, 2024
1 parent 6b96624 commit 3c5a8fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion basilisp_kernel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""The Basilisp Jupyter kernel"""

__version__ = '1.0b2'
__version__ = '1.0b3'

from .kernel import BasilispKernel
2 changes: 1 addition & 1 deletion basilisp_kernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def do_complete(self, code, cursor_pos):
completions = runtime.repl_completions(word_before_cursor) or ()
return {"status" : "ok",
"matches" : completions,
"cursor_start" : cursor_pos,
"cursor_start" : cursor_pos-len(last_word),
"cursor_end" : cursor_pos,
"metadata" : dict()
}
Expand Down
5 changes: 5 additions & 0 deletions test_basilisp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ class BasilispKernelTests(jkt.KernelTests):
"text": "[abc print",
"matches": {"printf", "println", "println-str", "print", "print-str"},
},
{
"text": "import sys\nsys/pl",
"matches": {"sys/platform", "sys/platlibdir"},
},

]

# code which should generate a (user-level) error in the kernel, and send
Expand Down

0 comments on commit 3c5a8fb

Please sign in to comment.