Compiler: Tab auto-completion in repl replaces existing characters instead of appending.

Created on 8 Aug 2018  ·  1Comment  ·  Source: elm/compiler

I found a bug in the 0.19 elm repl. Attempting to autocomplete by hitting <TAB> results in the existing letters of the word being _replaced_ by the remaining letters of the completed words, rather than the proper behavior, where the remaining letters are _appended_ to the existing letters.

Steps to reproduce:

SSCCE

$ elm repl       # (Version 0.19.0)
> elephant x y = x + y
<function> : number -> number -> number
> eleph  -- Pressing <TAB> here (with cursor just after h) results in the following line:
> ant      -- ❌Should be `elephant`

Tab completion works correctly in the 0.18 REPL:

$ elm repl       # (Version 0.18.0)
> elephant x y = x + y
<function> : number -> number -> number
> eleph  -- Pressing <TAB> here (with cursor just after h) results in the following line:
> elephant -- ✅

Most helpful comment

Thank you for the excellent issue!

It looks like I did not fully understand how the haskeline library would behave, so there was a really simple fix. Should be fixed in the next round of binaries.

Thanks again for the report!

>All comments

Thank you for the excellent issue!

It looks like I did not fully understand how the haskeline library would behave, so there was a really simple fix. Should be fixed in the next round of binaries.

Thanks again for the report!

Was this page helpful?
0 / 5 - 0 ratings