ability to go to line numbers
This commit is contained in:
@@ -260,4 +260,14 @@
|
||||
:String outText (if caseSensitive block.outText (block.outText.toLowerCase))]
|
||||
(when (or (inText.contains text) (outText.contains text))
|
||||
(return idx))))
|
||||
null))
|
||||
null))
|
||||
|
||||
// Return the block where a line number can be found, in either the input or output file
|
||||
(method :Null<Int> findLineNumber [:Int number :Bool output]
|
||||
(localVar &mut lineNumber 1)
|
||||
(doFor [idx block] (enumerate blocks)
|
||||
(let [blockText (if output block.outText block.inText)]
|
||||
(+= lineNumber .length (blockText.split "\n") -1)
|
||||
(when (>= lineNumber number)
|
||||
(return idx))))
|
||||
null)
|
Reference in New Issue
Block a user