Skip to content

Commit 66c15fe

Browse files
committed
gh-145398: Handle bracketed paste in isearch mode
Bind \<bracketed paste> to isearch-bracketed-paste and keep \x1b bound to isearch-end. Because the paste start marker is now consumed by the event queue, a lone Esc still ends the search immediately (no disambiguation delay), while a paste is dispatched to the command.
1 parent 3ad66c1 commit 66c15fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/_pyrepl/historical_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
isearch_keymap: tuple[tuple[KeySpec, CommandName], ...] = tuple(
34-
[("\\%03o" % c, "isearch-end") for c in range(256) if chr(c) not in ("\\", "\x1b")]
34+
[("\\%03o" % c, "isearch-end") for c in range(256) if chr(c) != "\\"]
3535
+ [(c, "isearch-add-character") for c in map(chr, range(32, 127)) if c != "\\"]
3636
+ [
3737
("\\%03o" % c, "isearch-add-character")
@@ -45,7 +45,7 @@
4545
(r"\C-c", "isearch-cancel"),
4646
(r"\C-g", "isearch-cancel"),
4747
(r"\<backspace>", "isearch-backspace"),
48-
(r"\x1b[200~", "isearch-bracketed-paste"),
48+
(r"\<bracketed paste>", "isearch-bracketed-paste"),
4949
]
5050
)
5151

0 commit comments

Comments
 (0)