MCPcopy Index your code
hub / github.com/python/cpython / fix_x11_paste

Function fix_x11_paste

Lib/idlelib/pyshell.py:1453–1461  ·  view source on GitHub ↗

Make paste replace selection on x11. See issue #5124.

(root)

Source from the content-addressed store, hash-verified

1451
1452
1453def fix_x11_paste(root):
1454 "Make paste replace selection on x11. See issue #5124."
1455 if root._windowingsystem == 'x11':
1456 for cls in 'Text', 'Entry', 'Spinbox':
1457 root.bind_class(
1458 cls,
1459 '<<Paste>>',
1460 'catch {%W delete sel.first sel.last}\n' +
1461 root.bind_class(cls, '<<Paste>>'))
1462
1463
1464usage_msg = """\

Callers 2

setUpClassMethod · 0.90
mainFunction · 0.85

Calls 1

bind_classMethod · 0.80

Tested by 1

setUpClassMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…