Fix saving session settings

This commit is contained in:
Dan Sanduleac 2013-12-20 13:17:59 +00:00 committed by Mark Harrah
parent a5b8dffc74
commit eb8077427e
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ object SessionSettings
}
val exist = tmpLines.reverse
val adjusted = if(!newSettings.isEmpty && needsTrailingBlank(exist)) exist :+ "" else exist
val lines = adjusted ++ newSettings.map(_._2).flatten.flatMap(_ :: "" :: Nil)
val lines = adjusted ++ newSettings.flatMap(_._2 ::: "" :: Nil)
IO.writeLines(writeTo, lines)
val (newWithPos, _) = ((List[SessionSetting](), adjusted.size + 1) /: newSettings) {
case ((acc, line), (s, newLines)) =>