GHCi 9.2.0.20210422 erases left hand side of interactive declaration when tab completion is requested
Summary
When pressing ⭾ while in an interactive prompt, all entered text left of the last equals sign (=
) is removed.
Steps to reproduce
- Open GHCi (
ghci
orghc --interactive
) - Type some text containing an equals sign (
=
) such aslet x = 2 +
- Press the “tab” key (⭾)
Expected behavior
GHCi will attempt to autocomplete the word left of the cursor.
Actual behavior
GHCi performs the expected behavior but also erases all text left of or at the rightmost equals sign (=
).
Demonstration
View this behavior in action in this terminal recording:
https://asciinema.org/a/424970
Environment
- GHC version used: 9.2.0.20210422
Optional:
- Operating System: Pop!_OS 21.04 on Linux 5.11.0-7620-generic
- System Architecture: x86 64
Edited by Anselm Schüler