Bug #560

RichTextView shouldn't mark white spaces on left double.

Added by Zbigniew Rebacz almost 7 years ago. Updated almost 7 years ago.

Status:RejectedStart date:11/01/2013
Priority:LowDue date:
Assignee:-% Done:

100%

Category:CtrlLibSpent time:-
Target version:-

Description

In my opinion we should remove following part from the RichTextView::LeftDouble(Point p, dword keyflags):

while(cursor + 1 < text.GetLength() && text[cursor] == ' ')
    cursor++;

, because above code contributes to marking white spaces.

The final form of the function is as follows:

void RichTextView::LeftDouble(Point p, dword keyflags)
{
    int pos = GetPointPos(p);
    if(IsLeNum(text[pos])) {
        anchor = pos;
        while(anchor > 0 && IsLeNum(text[anchor - 1]))
            anchor--;
        cursor = pos;
        while(cursor + 1 < text.GetLength() && IsLeNum(text[cursor]))
            cursor++;
        RefreshSel();
        SetFocus();
    }
}

Moreover, I enclose improved source file.

History

#1 Updated by Zbigniew Rebacz almost 7 years ago

  • File deleted (RichTextView.cpp)

#2 Updated by Zbigniew Rebacz almost 7 years ago

Improved source file can be found on following website: http://www.ultimatepp.org/redmine/issues/560.

#3 Updated by Miroslav Fidler almost 7 years ago

  • Status changed from Ready for QA to New

I not quite sure about this. Adding that space has some merits in RichEdit, e.g. you can easily move words using drag&drop.

Interestingly, Microsoft editors select the additional space, OpenOffice does not. I would prefer M$ approach here.

RichTextView should IMO stay consistent with RichEdit.

#4 Updated by Zbigniew Rebacz almost 7 years ago

  • Status changed from New to Rejected
  • Assignee deleted (Zbigniew Rebacz)

#5 Updated by Zbigniew Rebacz almost 7 years ago

You are right Mirek.

Also available in: Atom PDF