Skip to content
Browse files

fixed line number within compiled region

  • Loading branch information...
1 parent 7ff3c89 commit 02cf45e67528b0f27e10d9f26212793df39136c9 @hugoduncan hugoduncan committed Apr 3, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/swank/commands/basic.clj
View
5 src/swank/commands/basic.clj
@@ -43,8 +43,9 @@
(defn- compile-region
"Compile region."
([string file line]
- (with-open [rdr (proxy [LineNumberingPushbackReader] ((StringReader. string))
- (getLineNumber [] line))]
+ (with-open [rdr1 (proxy [LineNumberingPushbackReader] ((StringReader. string)))
+ rdr (proxy [LineNumberingPushbackReader] (rdr1)
+ (getLineNumber [] (+ line (.getLineNumber rdr1) -1)))]
(clojure.lang.Compiler/load rdr file (.getName (File. file))))))

0 comments on commit 02cf45e

Please sign in to comment.
Something went wrong with that request. Please try again.