stream.match and tab character

Hi, I have a simple Overlay plugin that detects sentence endings in the stream. It works in all cases except if there is a tab (\t) character somewhere in the line that stream is handling. In that case everything after the tab breaks. Is tab character treated differently that other characters?


indentation() → integer
Tells you how far the current line has been indented, in spaces. Corrects for tab characters.

have something with it? If yes, I don’t know how to use it.


You didn’t say how it breaks, so there’s not much I can make of this. The indentation method will take tab size (and position) into account when computing how many columns a given line is indented.

Hi, so: if one tab equals 4 spaces. the stream.column() method will treat one character that is tab as 4 columns?

Tabs count as tabSize - startColumn % tabSize, corresponding to their width in the visible editor.

Thanks, that was the source of my problem.