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

ignore Enter keypress when menu has no selection #1704

Commits on Feb 23, 2022

  1. ignore Enter keypress when menu has no selection

    supersedes helix-editor#1622
    
    Builds on the work in helix-editor#1285. I want to allow Enter to create a newline
    when there is no selection in the autocomplete menu.
    
    This occurs somewhat often when using LSP autocomplete in Elixir which
    uses `do/end` blocks (and I set the autocomplete menu delay to 0 which
    exacerbates the problem):
    
    ```elixir
    defmodule MyModule do
      def do_foo(x) do
        x
      end
      def other_function(y) do|
    end
    ```
    
    Here the cursor is `|` in insert mode. The LSP suggests `do_foo` but I
    want to create a newline. Hitting Enter currently closes the menu,
    so I end up having to hit Enter twice when the module contains any
    local with a `do` prefix, which can be inconsistent. With this change,
    we ignore the Enter keypress to end up creating the newline in this case.
    the-mikedavis committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    262d1d7 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2022

  1. Configuration menu
    Copy the full SHA
    e04c3a0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    038aaa1 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2022

  1. Configuration menu
    Copy the full SHA
    1324e40 View commit details
    Browse the repository at this point in the history