Skip to content

Test: multi-cursor inline completions #205562

Closed

Description

Refs: #201308

Complexity: 3

Create Issue


This iteration we have made Copilot inline completions (ghost text) compatible with multiple cursor positions. Previously the inline completions were visible and applied only at the primary cursor position. Generally speaking, the inline completions that are inserted at the secondary cursors correspond to the inline completions to the right of the primary cursor. This means that if there are inline completions or code/text to the left of the primary cursor, this is not inserted at the secondary cursor positions.‡

To test, please follow the following steps:

  1. Install and enable the Copilot extension. Enable the setting github.copilot.editor.enableAutoCompletions.
  2. Open a file and place multiple cursors at different positions
  3. Write some code/text until you see ghost text appear
  4. Verify that the ghost text appears at all cursor positions
  5. Click on the Tab key. Verify that the whole suggestion is accepted and inserted as expected into the editor.
  6. Repeat steps 3 and 4. Click on cmd+arrow (if on Mac) or ctrl+arrow (if on Windows). Verify that you partially accept the inline completion at all cursor positions.
  7. Repeat steps 1 to 6 so that the cursor positions are not on the same column index. In the image below for example the primary cursor is located after for ( on line 22 and the secondary cursor is located after for on line 20. Verify that the inline completions are displayed and inserted correctly given the point ‡ above.
Screenshot 2024-02-19 at 17 23 16

Activity

  1. changed the title [-]Test: Multi-cursor inline completions[/-] [+]Test: multi-cursor inline completions[/+] on Feb 19, 2024
  2. removed their assignment
    on Feb 20, 2024
  3. roblourens commented on Feb 20, 2024

    @roblourens
    Member

    Is it expected that I can only get that completion toolbar to show up on the completion for the primary cursor location?

  4. aiday-mar commented on Feb 20, 2024

    @aiday-mar
    CollaboratorAuthor

    Hi roblourens yes so this is something we have not yet developed. As you correctly mentioned the toolbar only appears at the primary cursor location, but we will aim to make it appear at the others.

  5. andreamah commented on Feb 21, 2024

    @andreamah
    Contributor

    Worked great for me, good work! 👍

  6. locked and limited conversation to collaborators on Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions