Opened 4 years ago

Closed 4 years ago

#5548 closed bug (fixed)

Problem while pasting code into ghci

Reported by: gawi Owned by: igloo
Priority: high Milestone: 7.4.1
Component: GHCi Version: 7.0.2
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

In X, when pasting text into the ghci console, many characters are lost. This is not happening for other similar console reading programs (for instance MySQL console). It does not seem to depend on the terminal program (I've tested with gnome-terminal, konsole and xterm).

If I copy-paste the following text (either by clicking on the middle button of the mouse or by calling the paste function of the terminal program):

1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890
1234567890

I got this in ghci (my prompt is: λ> ):

λ> 1234567890
1234567890
λ> 
λ> 0
0
λ> 90
90
λ> 890
890
λ> 7890
7890
λ> 67890
67890
λ> 567890
567890
λ> 4567890
4567890
λ> 34567890

It's as if the input was not consumed fast enough...

Change History (5)

comment:1 Changed 4 years ago by judahj

Thanks for the report! This is a regression in the Haskeline package (which GHC uses for command-line input):

http://trac.haskell.org/haskeline/ticket/73#comment:3

I'll work on the fix to Haskeline, which should be pretty minor.

comment:2 Changed 4 years ago by igloo

  • Owner set to judahj

Thanks Judah!

comment:3 Changed 4 years ago by judahj

I've released haskeline-0.6.4.4, which includes the fix for this issue. The repo at code.haskell.org/haskeline also contains the fix.

comment:4 Changed 4 years ago by simonmar

  • Milestone set to 7.4.1
  • Owner changed from judahj to igloo
  • Priority changed from normal to high

Let's make sure we get this into 7.4.1.

comment:5 Changed 4 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

Patch pulled.

Note: See TracTickets for help on using tickets.