diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e9044979..bf685557 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,7 +5,7 @@ on: [push, pull_request] env: GO_VERSION: 1.14 - PYTHON_VERSION: '3.x' + PYTHON_VERSION: '3.10' jobs: tests: @@ -55,4 +55,4 @@ jobs: - name: Integration tests run: | source ./venv/bin/activate - make integration \ No newline at end of file + make integration diff --git a/completion.go b/completion.go index ad5b25b5..ef58c9a4 100644 --- a/completion.go +++ b/completion.go @@ -66,6 +66,10 @@ func (c *CompletionManager) Reset() { // Update to update the suggestions. func (c *CompletionManager) Update(in Document) { c.tmp = c.completer(in) + if c.selected >= len(c.tmp) { + c.selected = -1 + c.verticalScroll = 0 + } } // Previous to select the previous suggestion item.