Skip to content

Commit

Permalink
Fixed SessionSettings replacing existing setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Sanduleac authored and eed3si9n committed Mar 21, 2014
1 parent 85ab1c3 commit 2991652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/src/main/scala/sbt/SessionSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object SessionSettings
val RangePosition(_, r@LineRange(start, end)) = s.pos
settings find (_._1.key == s.key) match {
case Some(ss@(ns, newLines)) if !ns.init.dependencies.contains(ns.key) =>
val shifted = ns withPos RangePosition(path, LineRange(start - offs, start - offs + 1))
val shifted = ns withPos RangePosition(path, LineRange(start - offs, start - offs + newLines.size))
(offs + end - start - newLines.size, shifted::olds, ss::repl, lineMap + (start -> (end, newLines)))
case _ =>
val shifted = s withPos RangePosition(path, r shift -offs)
Expand Down

0 comments on commit 2991652

Please sign in to comment.