Make paste replace selection on x11. See issue #5124.
(root)
| 1451 | |
| 1452 | |
| 1453 | def 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 | |
| 1464 | usage_msg = """\ |
searching dependent graphs…