Created attachment 102998 [details] The screenshots When I select a text in the katepart-driven editor and try to drag it in forward direction then selection of the inserted text is shifted by the size of the dragged text. See the screenshots for explanation. At the first picture I had selected the 'Line 2'. At the second I tried to drag it to the empty line and it was dragged, but a selection is "jumped" at a somewhere unexpected place.
Created attachment 102999 [details] The patch
Indeed, from reading the code, it seems this issue already exists for years. Strange no one ever stumbled over this.
Pending review request with unit test: https://git.reviewboard.kde.org/r/129758/
Git commit a4ad36c174f498cc884acaefe01b8443f69f1d79 by Dominik Haumann. Committed on 07/01/2017 at 11:15. Pushed by dhaumann into branch 'master'. Fix: Forward dragging text results in wrong selection Thanks to Serge Roussak for the patch! REVIEW: 129758 M +67 -0 autotests/src/kateview_test.cpp M +2 -0 autotests/src/kateview_test.h M +8 -4 src/view/kateviewinternal.cpp https://commits.kde.org/ktexteditor/a4ad36c174f498cc884acaefe01b8443f69f1d79