Permalink
Browse files

Moved compound edit setup inside try/catch

  • Loading branch information...
djspiewak committed Dec 10, 2011
1 parent 8928750 commit d28e4915c08f3a90ba86c9ff921604d022183470
Showing with 2 additions and 2 deletions.
  1. +2 −2 clients/jedit/src/main/scala/com/codecommit/cccp/jedit/CCCPPlugin.scala
@@ -134,14 +134,14 @@ object CCCPPlugin {
field.setAccessible(true)
field.set(buffer, true)
+ buffer.beginCompoundEdit()
try {
- buffer.beginCompoundEdit()
actions foreach {
case InsertAt(offset, text) => buffer.insert(offset, text)
case DeleteAt(offset, text) => buffer.remove(offset, text.length)
}
- buffer.endCompoundEdit()
} finally {
+ buffer.endCompoundEdit()
field.set(buffer, false)
}

0 comments on commit d28e491

Please sign in to comment.