dhaumann requested changes to this revision. dhaumann added a comment. This revision now requires changes to proceed.
I think the patch makes sense, but I would prefer using a Qt function qPopulationCount to count the bits instead of doing own bitmask magic. Could you provide an updated patch? INLINE COMMENTS > kateviewhelpers.cpp:2145 > + const uint singleMark = // is the default or the only > editable mark > + (editBits & (editBits - 1)) ? // true if number of > editable marks > 1 > + editBits & config->defaultMarkType() : I would prefer using qPopulationCounte (see http://doc.qt.io/qt-5/qtalgorithms.html#qPopulationCount): // is the default or the only editable mark const uint singleMark = (qPopulationCount(editBits) > 1) ? editBits & config->defaultMarkType() : editBits; REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D7167 To: croick, #ktexteditor, dhaumann Cc: dhaumann, kwrite-devel, #frameworks