Skip to content

Commit dd22ad6

Browse files
committed
Move E999 one pos to the right if at EOL
1 parent 688468f commit dd22ad6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

linter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,10 @@ def reposition_match(self, line, col, m, virtual_view):
8080
count = int(match.group(1))
8181
return (line - (count - 1), 0, count - 1)
8282

83+
if code == 'E999':
84+
txt = virtual_view.select_line(line).rstrip('\n')
85+
last_col = len(txt)
86+
if col + 1 == last_col:
87+
return line, last_col, last_col
88+
8389
return super().reposition_match(line, col, m, virtual_view)

0 commit comments

Comments
 (0)