Skip to content

Commit 830a333

Browse files
paste events sent to stdin when appropriate
Previously constituent events of a paste event were always processed normally, with no conditional checking for whether stdin currently had focus. Now this is checked, events are directed there until it no longer has focus.
1 parent 617ef9e commit 830a333

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,10 @@ def process_event(self, e):
282282
return self.process_event(ctrl_char)
283283
with self.in_paste_mode():
284284
for ee in e.events:
285-
self.process_simple_event(ee)
285+
if self.stdin.has_focus:
286+
self.stdin.process_event(ee)
287+
else:
288+
self.process_simple_event(ee)
286289
self.update_completion()
287290

288291
elif e in self.rl_char_sequences:

0 commit comments

Comments
 (0)