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

Something strange happened when using auto completion #886

Closed
WindSoilder opened this issue Oct 21, 2021 · 2 comments
Closed

Something strange happened when using auto completion #886

WindSoilder opened this issue Oct 21, 2021 · 2 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@WindSoilder
Copy link
Contributor

WindSoilder commented Oct 21, 2021

Reproduction steps

Sorry for that I don't know how to describe it in a good way, you can look the upload video please.

It seems that when I:

  1. type os.read_ and then
  2. delete two character os.rea and then
  3. select the auto completion item, the result is os.rearead, which should be os.read
2021-10-21.10.00.48.mov

Environment

  • Platform: macOS
  • Helix version: v0.4.1-248-g0fa8baf
~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines
@WindSoilder WindSoilder added the C-bug Category: This is a bug label Oct 21, 2021
@archseer
Copy link
Member

I think this is 4) here: #822

It's likely got something to do with the hack we do here

// if more text was entered, remove it
// TODO: ideally to undo we should keep the last completion tx revert, and map it over new changes
let cursor = doc
.selection(view.id)
.primary()
.cursor(doc.text().slice(..));
if trigger_offset < cursor {
let remove = Transaction::change(
doc.text(),
vec![(trigger_offset, cursor, None)].into_iter(),
);
doc.apply(&remove, view.id);
}

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Oct 21, 2021
@archseer
Copy link
Member

Should be fixed in 3edca78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants