Ticket #111 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Incorect calculations for multi-line prompt

Reported by: guest Owned by:
Priority: minor Milestone: 0.6.3
Version: 0.6 Keywords:
Cc: lordrat@…


For multi-line prompt (containing new-line characters for example) haskeline behaves like the last line has length of whole prompt.


prompt = "Some text.\nPrompt> "

This causes problems when editing really long line (longer than width of window).

Change History

Changed 7 years ago by judah

  • cc lordrat@… added
  • keywords lordrat@e-region.net removed
  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 0.6.3

Fixed in HEAD, by:

Fri Sep 10 14:50:54 PDT 2010  Judah Jacobson <judah.jacobson@gmail.com>
  * #111: Correct width calculations when the prompt contains newlines.
  Before running terminal-style interaction, we print out all but the last line of the prompt,
  and then use the last line for interaction.
  I also did some minor refactoring of the input functions to abstract out repeated code.

Changed 7 years ago by guest

Not exactly what I've expected (i.e. readline handles this differently (= after L all lines but last will not disappear)), but I'm OK with that as long as it does not breaks editing :-). Maybe I like it even more. Thanks.

Note: See TracTickets for help on using tickets.