Permalink
Browse files

Fix qlc_pt:get_lcid_line/1 with column numbers

  • Loading branch information...
1 parent 5e2c6bf commit 9356e9cb76fff60781a21e315451e60baa035b6c @nox nox committed Aug 25, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/stdlib/src/qlc_pt.erl
@@ -2694,9 +2694,14 @@ get_lcid_no(IdAttrs) ->
{line,Id} = erl_parse:get_attribute(IdAttrs, line),
abs(Id) bsr ?MAX_NUM_OF_LINES.
+
get_lcid_line(IdAttrs) ->
- {line,Id} = erl_parse:get_attribute(IdAttrs, line),
- sgn(Id) * (abs(Id) band ((1 bsl ?MAX_NUM_OF_LINES) - 1)).
+ {location,Loc} = erl_parse:get_attribute(IdAttrs, location),
+ erl_parse:set_line(
+ Loc,
+ fun (Id) ->
+ sgn(Id) * (abs(Id) band ((1 bsl ?MAX_NUM_OF_LINES) - 1))
+ end).
sgn(X) when X >= 0 ->
1;

0 comments on commit 9356e9c

Please sign in to comment.