I have found a behaviour which seems to be a bug in `tkinter`.
If you run the following (minimal to reproduce the bug) code:

```
import tkinter, tkinter.simpledialog, tkinter.scrolledtext
root = tkinter.Tk('test')
text = tkinter.scrolledtext.ScrolledText(master=root, wrap='none')
text.pack(side="top", fill="both", expand=True, padx=0, pady=0)
text.insert(tkinter.END, 'abc\ndef\nghi\nijk')
root.mainloop()

```

then:

* select one row in the `scrolledtext` widget, e.g. the row "ghi",
* copy it with `CTRL+C`
* do nothing else and close the app

Then paste it (`CTRL+V`) in any other Windows app: it won't work, nothing will be pasted. Why?

How to solve this?

---

Note: the expected behaviour is that text copied with CTRL+C should persist in the clipboard even if the app is closed. This is the default behaviour in many Windows software. Example here with `notepad.exe`:
link to the animated screen capture: <https://i.imgur.com/li7UvYw.mp4>

[![enter image description here](https://i.stack.imgur.com/8yVg4.png)](https://i.imgur.com/li7UvYw.mp4)

Note: this is linked to

* <https://bugs.python.org/issue23760>
* [Tkinter in Python 3.4 on Windows don't post internal clipboard data to the Windows clipboard on exit](https://stackoverflow.com/questions/26321333/tkinter-in-python-3-4-on-windows-dont-post-internal-clipboard-data-to-the-windo)
* [Tk only copies to clipboard if "paste" is used before program exits](https://stackoverflow.com/questions/46178950/tk-only-copies-to-clipboard-if-paste-is-used-before-program-exits/46180493#46180493)
* <https://core.tcl-lang.org/tk/tktview/1844034fffffffffffff>
* etc.