8000 Fix logical line off by one · python-mode/python-mode@9b4a338 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b4a338

Browse files
committed
Fix logical line off by one
1 parent a50403c commit 9b4a338

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymode/rope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,8 @@ def select_logical_line():
930930
start_line = lines.get_line_number(offset)
931931
line_finder = codeanalyze.LogicalLineFinder(lines)
932932

933-
start_lineno, _ = line_finder.logical_line_in(start_line)
934-
for _, (_, end_lineno) in zip(range(count), line_finder.generate_regions(start_line)):
933+
start_lineno, end_lineno = line_finder.logical_line_in(start_line)
934+
for _, (_, end_lineno) in zip(range(count - 1), line_finder.generate_regions(start_line)):
935935
pass
936936

937937
env.select_line(start_lineno, end_lineno)

0 commit comments

Comments
 (0)
0