Permalink
Browse files

*Really* fixed problem with non-positive retains this time

  • Loading branch information...
djspiewak committed Dec 10, 2011
1 parent d28e491 commit a157ee036e63c6852792ff64b0172a3d8e194da3
Showing with 4 additions and 1 deletion.
  1. +4 −1 clients/jedit/src/main/scala/com/codecommit/cccp/jedit/CCCPPlugin.scala
@@ -150,7 +150,10 @@ object CCCPPlugin {
// TODO type safety
private def sendChange(change: String, fileName: String, offset: Int, text: String, after: Int) {
val op = SExp(key(":retain"), offset, key(":" + change), text, key(":retain"), after)
val pre = if (offset > 0) key(":retain") :: IntAtom(offset) :: Nil else Nil
val mid = key(":" + change) :: StringAtom(text) :: Nil
val post = if (after > 0) key(":retain") :: IntAtom(after) :: Nil else Nil
val op = SExpList(pre ::: mid ::: post)
sendRPC(SExp(key("swank:edit-file"), fileName, op), callId())
}

0 comments on commit a157ee0

Please sign in to comment.