Skip to content

Commit 43f80d6

Browse files
authored
Merge pull request #128 from kaste/finetune-303
2 parents b841616 + d3c5dac commit 43f80d6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

linter.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,15 @@ def reposition_match(self, line, col, m, virtual_view):
136136
match = re.match(r'too many blank lines \((\d+)', m.message.strip())
137137
if match is not None:
138138
count = int(match.group(1))
139-
return (line - (count - 1), 0, count - 1)
139+
starting_line = line - count
140+
return (
141+
starting_line,
142+
0,
143+
sum(
144+
len(virtual_view.select_line(_line))
145+
for _line in range(starting_line, line)
146+
)
147+
)
140148

141149
if code == 'E999':
142150
txt = virtual_view.select_line(line).rstrip('\n')

0 commit comments

Comments
 (0)