You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The difference between column and character positions is evident for characters such as the tab character that can incorporate more than one column
So I have getColumn-like methods implemented completely wrong. I don't think it makes sense to have this function in ts-simple-ast because properly implemented it depends on how the character is displayed (ex. font, character design, tab size).
I'm going to deprecate these methods and replace them with sourceFile.getLengthFromLineStartAtPos(pos); (can't think of a better name atm).
dsherret
changed the title
Getting a column should be 1-indexed
Remove ability to get column and replace with getting character count from line start
Jul 4, 2018
Silly mistake, but a column should be 1-indexed. For example:
This applies to
getColumnAtPos
,getStartColumn
andgetEndColumn
.The text was updated successfully, but these errors were encountered: