Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completions: Do not trigger completions if there is code in the suffix of this line except some known characters (e.g. )}];) #52582

Closed
philipp-spiess opened this issue May 30, 2023 · 0 comments · Fixed by #52623
Assignees
Labels

Comments

@philipp-spiess
Copy link
Contributor

No description provided.

@philipp-spiess philipp-spiess changed the title Do not trigger completions if there is code in the suffix of this line except some known characters (e.g. )}];) Completions: Do not trigger completions if there is code in the suffix of this line except some known characters (e.g. )}];) May 30, 2023
@philipp-spiess philipp-spiess self-assigned this May 30, 2023
philipp-spiess added a commit that referenced this issue May 31, 2023
…ffix (#52623)

Closes #52582

Another branch that looks at the suffix _for the same line_. That is,
the code that is written in the same line as the cursor but after the
cursor. If this contains any word character (which is a-z, A-Z, 0-9,
including _), we're now bailing out of completions.

If it's only symbols, we still trigger completions so this case where
characters are merged is still working as expected:

<img width="248" alt="Screenshot 2023-05-30 at 17 25 54"
src="https://github.com/sourcegraph/sourcegraph/assets/458591/8b6b47a7-68e5-4396-930c-7b463d5b1be9">

## Test plan

- see unit test
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
ErikaRS pushed a commit that referenced this issue Jun 22, 2023
…ffix (#52623)

Closes #52582

Another branch that looks at the suffix _for the same line_. That is,
the code that is written in the same line as the cursor but after the
cursor. If this contains any word character (which is a-z, A-Z, 0-9,
including _), we're now bailing out of completions.

If it's only symbols, we still trigger completions so this case where
characters are merged is still working as expected:

<img width="248" alt="Screenshot 2023-05-30 at 17 25 54"
src="https://github.com/sourcegraph/sourcegraph/assets/458591/8b6b47a7-68e5-4396-930c-7b463d5b1be9">

## Test plan

- see unit test
<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant