Hi, It seems the the issue has been fixed upstream (see [1,2]). According to [1] this issue is connected to #971923.
Since the issue is really really annoying I kindly ask to back-port the fix implemented upstream in [2] which is quite simple.
[1] https://github.com/jupyter/qtconsole/issues/437 [2] https://github.com/jupyter/qtconsole/pull/438 kind regards -- Antonio Valentino