Make paste replace selection on x11. See issue #5124.
(root)
| 1454 | |
| 1455 | |
| 1456 | def 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 | |
| 1467 | usage_msg = """\ |