{"action":"closed","issue":{"url":"https://api.github.com/repos/olafurpg/scalafmt/issues/195","repository_url":"https://api.github.com/repos/olafurpg/scalafmt","labels_url":"https://api.github.com/repos/olafurpg/scalafmt/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/olafurpg/scalafmt/issues/195/comments","events_url":"https://api.github.com/repos/olafurpg/scalafmt/issues/195/events","html_url":"https://github.com/olafurpg/scalafmt/issues/195","id":151620042,"number":195,"title":"Lambdas nested in other expressions have inconsistent indentation ","user":{"login":"densh","id":320966,"avatar_url":"https://avatars.githubusercontent.com/u/320966?v=3","gravatar_id":"","url":"https://api.github.com/users/densh","html_url":"https://github.com/densh","followers_url":"https://api.github.com/users/densh/followers","following_url":"https://api.github.com/users/densh/following{/other_user}","gists_url":"https://api.github.com/users/densh/gists{/gist_id}","starred_url":"https://api.github.com/users/densh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/densh/subscriptions","organizations_url":"https://api.github.com/users/densh/orgs","repos_url":"https://api.github.com/users/densh/repos","events_url":"https://api.github.com/users/densh/events{/privacy}","received_events_url":"https://api.github.com/users/densh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/olafurpg/scalafmt/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-28T11:41:05Z","updated_at":"2016-05-13T08:20:10Z","closed_at":"2016-05-13T08:20:10Z","body":"Original:\r\n```scala\r\nval cases = catches.map {\r\n  case CaseDef(pat, _, body) =>\r\n    val (symopt, excty) = pat match {\r\n      case Typed(Ident(nme.WILDCARD), tpt) =>\r\n        (None, genType(tpt.tpe))\r\n      case Ident(nme.WILDCARD) =>\r\n        (None, genType(ThrowableClass.tpe))\r\n      case Bind(_, _) =>\r\n        (Some(pat.symbol), genType(pat.symbol.tpe))\r\n    }\r\n\r\n    (excty, { focus: Focus =>\r\n      val enter = symopt.map { sym =>\r\n        val cast = focus withOp Op.As(excty, exc.value)\r\n        curEnv.enter(sym, cast.value)\r\n        cast\r\n      }.getOrElse(focus)\r\n      val begin = enter withOp Nrt.call(Nrt.begin_catch, excwrap.value)\r\n      val res   = genExpr(body, begin)\r\n      val end   = res withOp Nrt.call(Nrt.end_catch)\r\n      end withValue res.value\r\n    })\r\n}\r\n```\r\n\r\nScalafmt:\r\n```scala\r\nval cases = catches.map {\r\n  case CaseDef(pat, _, body) =>\r\n    val (symopt, excty) = pat match {\r\n      case Typed(Ident(nme.WILDCARD), tpt) =>\r\n        (None, genType(tpt.tpe))\r\n      case Ident(nme.WILDCARD) =>\r\n        (None, genType(ThrowableClass.tpe))\r\n      case Bind(_, _) =>\r\n        (Some(pat.symbol), genType(pat.symbol.tpe))\r\n    }\r\n\r\n    (excty, { focus: Focus =>\r\n    val enter = symopt.map { sym =>\r\n      val cast = focus withOp Op.As(excty, exc.value)\r\n      curEnv.enter(sym, cast.value)\r\n      cast\r\n    }.getOrElse(focus)\r\n    val begin = enter withOp Nrt.call(Nrt.begin_catch, excwrap.value)\r\n    val res   = genExpr(body, begin)\r\n    val end   = res withOp Nrt.call(Nrt.end_catch)\r\n    end withValue res.value\r\n  })\r\n}\r\n```\r\n\r\nI would like the code to stay as-is same\r\n\r\nUsing\r\n* 0.2.2"}}