Skip to content

Commit

Permalink
Fix wrapping on-submit for ammonite-terminal after pasting lines whic…
Browse files Browse the repository at this point in the history
…h overflow
  • Loading branch information
Li Haoyi committed Aug 5, 2015
1 parent 6f7aa5b commit e8969d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project/Constants.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ammonite
object Constants{
val version = "0.4.1"
val version = "0.4.2"
}
6 changes: 5 additions & 1 deletion terminal/src/main/scala/ammonite/terminal/TermCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ object TermCore {
readChar(TermState(s, b, newCursor), nextUps)

case Result(s) =>
redrawLine(lastState.buffer, lastState.buffer.length, ups)
val (_, oldCursorY, _) = calculateHeight(
lastState.buffer, lastState.cursor, width, noAnsiPrompt
)

redrawLine(lastState.buffer, lastState.buffer.length, oldCursorY)
writer.write(10)
writer.write(13)
writer.flush()
Expand Down

0 comments on commit e8969d6

Please sign in to comment.