zedapp/zed — pull request #104 by TheKiteEatingTree (2014-03-05 06:00:34+00:00)
Title: quick and dirty fix for incorrectly underlined identifiers when using tabs

Quick fix for #101.

jshint seems to assume by default that 1 tab = 4 spaces. It then returns a column where an error occurs. findIdentifierRange in check.js for the javascript mode treats the column int like it's an index in a character array rather than a column displayed in an editor. This fix causes those to work out, unless someone puts a tab after the error column.

I thought jshint would have an option that specified the length of a tab, but I messed with the indent option and had no luck so I just hard coded in to reduce by 3. This feels wrong but seems to work ok.