D11685: Implement single click on line number to select line of text

Milian Wolff noreply at phabricator.kde.org
Tue Apr 3 19:53:26 UTC 2018


mwolff added a comment.


  the "also" in your commit message: can you split this commit into two parts, or is the feature addition also fixing the bug? Put differently: Could you first fix the bug, then add the feature, in separate commits?

INLINE COMMENTS

> kateviewhelpers.cpp:2018
>          m_lastClickedLine = t.line();
> -        if (positionToArea(e->pos()) != IconBorder && positionToArea(e->pos()) != AnnotationBorder) {
> +        auto area = positionToArea(e->pos());
> +        if (area != IconBorder && area != AnnotationBorder) {

const

> kateviewhelpers.cpp:2019
> +        auto area = positionToArea(e->pos());
> +        if (area != IconBorder && area != AnnotationBorder) {
> +            auto pos = QPoint(0, e->y());

can you comment this code, why exclude these areas?

> kateviewhelpers.cpp:2183
>      const KateTextLayout &t = m_viewInternal->yToKateTextLayout(e->y());
> +    auto area = positionToArea(e->pos());
>      if (t.isValid()) {

const

> kateviewinternal.cpp:2787
> +    placeCursor(pos);
> +    m_possibleTripleClick = true;
> +}

dito comment, what has triple click to do with *begin* of select line? Is this b/c an actual triple click would select the line?

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D11685

To: rkron, #frameworks, #kate, #ktexteditor, ngraham, cullmann
Cc: mwolff, richardbowen, ngraham, #ktexteditor, #kate, #frameworks, michaelh, kevinapavew, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180403/f282af94/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list