Git Product home page Git Product logo

Comments (6)

jasonrudolph avatar jasonrudolph commented on May 17, 2024

Some early findings regarding the cause of the current behavior:

  • The autocomplete-plus package subscribes to events from TextBuffer::onDidChangeText. Those events are handled by AutocompleteManager::showOrHideSuggestionListForBufferChanges. [code]
  • In showOrHideSuggestionListForBufferChanges, if the buffer's text changed somewhere that isn't near the "last cursor," then autocomplete-plus hides the suggestion list. [code]

In other words, because autocomplete-plus is watching for any text changes to the buffer, if User A triggers the autocomplete selection list, and then User B changes the text somewhere else in the buffer, autocomplete-plus hides User A's autocomplete selection list.

from teletype.

jasonrudolph avatar jasonrudolph commented on May 17, 2024

As far as I can tell, this behavior in autocomplete-plus originated from the desire to cancel autocompletion when the user enters more than one character with a single keystroke (e.g., pasting).

from teletype.

leroix avatar leroix commented on May 17, 2024

Interesting, so we need to make the check in autocomplete-plus more specific? For instance, autocomplete seems to work as expected when multiple cursors are present.

from teletype.

jasonrudolph avatar jasonrudolph commented on May 17, 2024

Interesting, so we need to make the check in autocomplete-plus more specific?

@leroix: Probably so. Hopefully we can make it happen.

@nathansobo: I think atom/autocomplete-plus@05d33f8 might meet our needs for this issue. I'm gonna hold off on opening up a PR in atom/autocomplete-plus until we can try out atom/autocomplete-plus@05d33f8 locally together while pairing. If all is well, I'll open a PR to get that change rolled into autocomplete-plus.

from teletype.

jasonrudolph avatar jasonrudolph commented on May 17, 2024

I'm gonna hold off on opening up a PR in atom/autocomplete-plus until we can try out atom/autocomplete-plus@05d33f8 locally together while pairing. If all is well, I'll open a PR to get that change rolled into autocomplete-plus.

@as-cii and I tried it out this morning, and everything seemed to work well. I've opened atom/autocomplete-plus#887 to get this change into autocomplete-plus.

from teletype.

jasonrudolph avatar jasonrudolph commented on May 17, 2024

I've opened atom/autocomplete-plus#887 to get this change into autocomplete-plus.

I've merged atom/autocomplete-plus#887 and incorporated that change into atom/atom (atom/atom#15652). With that done, I'm gonna close this issue.

If anyone notices any undesirable interactions between autocomplete and real-time collaboration when using the latest dev build of atom/atom, please reopen an issue or open a new one with additional details. 🙇

from teletype.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.