MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / fix_x11_paste

Function fix_x11_paste

tools/python-3.11.9-amd64/Lib/idlelib/pyshell.py:1456–1464  ·  view source on GitHub ↗

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

(root)

Source from the content-addressed store, hash-verified

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

Callers 2

setUpClassMethod · 0.90
mainFunction · 0.85

Calls 1

bind_classMethod · 0.80

Tested by 1

setUpClassMethod · 0.72