Skip to content

Commit

Permalink
Call str on a prompt before concatenating
Browse files Browse the repository at this point in the history
  • Loading branch information
pyos committed Jan 29, 2017
1 parent 9d9a536 commit bdea644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readline.dg
Expand Up @@ -311,7 +311,7 @@ Readline = subclass object where
@erase state
prefix = if
state.prompt :: collections.Callable => state.prompt state
otherwise => state.prompt
otherwise => str state.prompt
prelen = len $ Sequence.sub (m -> m.group 1 or '') prefix
wh, ww = @tty.size
h, w = prelen + len state.buffer `divmod` ww
Expand Down Expand Up @@ -366,7 +366,7 @@ Readline = subclass object where
@erase state
prefix = if
state.prompt :: collections.Callable => state.prompt state
otherwise => state.prompt
otherwise => str state.prompt
@tty.write $ prefix + @preprocess state.buffer + '\n\r'
@tty.flush
state
Expand Down

0 comments on commit bdea644

Please sign in to comment.