D18793: Handle text completion with block selection mode
Ahmad Samir
noreply at phabricator.kde.org
Mon Mar 25 09:14:40 GMT 2019
ahmadsamir added a comment.
In D18793#437220 <https://phabricator.kde.org/D18793#437220>, @cullmann wrote:
> Hi, I still don't like that we do different things in replaceText depending on the selection of the potential activeView, that makes this function harder to use correctly, as it might magically do something the user might not expect.
If the code is moved to say insertText it'd be the same problem, just further down the line.
I could overload replaceText, with the overload taking a view parameter with the responsibility of deciding which replaceText to use falling on the caller; (which is something KDevelop wants to avoid to ease their integration). The thing is, this piece of code needs a home somewhere.
- replaceText shouldn't use typeChars because the latter is interactive by design
- replaceText shouldn't be over-clever and do something different/unexpected depending on the selection in the activeView()
The work of inserting the completion falls on executeCompletionItem, so it should be handled there; also note that executeCompletionItem will become more complicated anyway, because of the remove-tail functionality...
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D18793
To: ahmadsamir, #ktexteditor, cullmann, dhaumann, mwolff
Cc: loh.tar, kde-frameworks-devel, kwrite-devel, #ktexteditor, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190325/f97364a2/attachment.html>
More information about the KWrite-Devel
mailing list