There was an error while loading. Please reload this page.
1 parent d5d9e29 commit 6ed2477Copy full SHA for 6ed2477
prompt_toolkit/key_binding/bindings/named_commands.py
@@ -561,7 +561,8 @@ def operate_and_get_next(event):
561
562
# Set the new index at the start of the next run.
563
def set_working_index():
564
- buff.working_index = new_index
+ if new_index < len(buff._working_lines):
565
+ buff.working_index = new_index
566
567
event.cli.pre_run_callables.append(set_working_index)
568
0 commit comments