From d0a1030c350900e9644288f6cb6134345d55893d Mon Sep 17 00:00:00 2001 From: Nikita Kalyazin Date: Wed, 23 Apr 2014 13:39:01 +0400 Subject: [PATCH] lint: fix indent --- src/cscope.coffee | 56 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/cscope.coffee b/src/cscope.coffee index 7046b26..bba2c8a 100644 --- a/src/cscope.coffee +++ b/src/cscope.coffee @@ -34,34 +34,34 @@ genericFind = (cmd, symbol, db, callback) -> .wait cscopeRegex .sendline quitCmd .run (err, stdout, exitcode) -> - if err - console.log "could not invoke cscope (#{err})" - process.exit 1 - header = stdout[1].match(cscopeRegex) - lines = parseInt(header[1]) - if lines == 0 # no such symbol - return null - - startIdx = 2 - res = [] - drop_next = null - # for line in [startIdx..startIdx + lines - 1] - padding = 3 # 2 x ">>" and lines count - # FIXME: ugly hack - for line in [startIdx..startIdx + (stdout.length - padding) - 1] - if drop_next - drop_next = null - continue - m = stdout[line].match(outputRegex) - if !m # broken line - m = (stdout[line] + stdout[line + 1]).match(outputRegex) - drop_next = 1 - res.push - file: m[1] - sym: m[2] - line: m[3] - ctx: m[4] - callback res + if err + console.log "could not invoke cscope (#{err})" + process.exit 1 + header = stdout[1].match(cscopeRegex) + lines = parseInt(header[1]) + if lines == 0 # no such symbol + return null + + startIdx = 2 + res = [] + drop_next = null + # for line in [startIdx..startIdx + lines - 1] + padding = 3 # 2 x ">>" and lines count + # FIXME: ugly hack + for line in [startIdx..startIdx + (stdout.length - padding) - 1] + if drop_next + drop_next = null + continue + m = stdout[line].match(outputRegex) + if !m # broken line + m = (stdout[line] + stdout[line + 1]).match(outputRegex) + drop_next = 1 + res.push + file: m[1] + sym: m[2] + line: m[3] + ctx: m[4] + callback res findSymbol = (symbol, db, callback) -> genericFind findSymbolCmd, symbol, db, callback