Skip to content

Commit 2fe1b7a

Browse files
committed
Revert part of column change
Use the start column of the comment on each line. Use the end column only on the last line.
1 parent 33a446d commit 2fe1b7a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pygccxml/parser/scanner.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,9 @@ def _handle_comment(self, declaration):
218218
file_text = self.__files_text.get(file_decl)
219219
# Use lines and columns to capture only comment text
220220
for indx in range(comm_decl.begin_line - 1, comm_decl.end_line):
221-
# Col data only useful on first and last lines
222-
strt_idx = 0
221+
# Col data only different on the last line
223222
end_idx = -1
224-
if indx == comm_decl.begin_line - 1:
225-
strt_idx = comm_decl.begin_column - 1
223+
strt_idx = comm_decl.begin_column - 1
226224
if indx == comm_decl.end_line - 1:
227225
end_idx = comm_decl.end_column
228226
comm_line = file_text[indx]

0 commit comments

Comments
 (0)