Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - Bad drawing of selection after end of line
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bad drawing of selection after end of line

 Post Reply Post Reply
Author
Message
peerschindel View Drop Down
Groupie
Groupie


Joined: 12 July 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote peerschindel Quote  Post ReplyReply Direct Link To This Post Topic: Bad drawing of selection after end of line
    Posted: 20 April 2009 at 10:54am
Hello Syntax Edit team,

I just want to make a proposal for the following effect (what - I think - is a bug).

Suppose I have a text file with 2 lines:
 
1234567890
ABC
 
So 10 character in the 1st line and 3 characters in the 2nd line.
Then I press <End> to go to end of 1st line. Then I press <Down> to go to end of 2nd line.
I brings me behind the 3rd (so the last) character of 2nd line. So far, so good.
But when I now press <Shift>+<End>, it draws, as if 7 (non-existing) space characters
were selected. But they are not (because I cannot copy them to clipboard, etc.).
 
Note: Virtual space is NOT enabled for my syntax edit control.
 
So I would suggest the following fix in file "XTPSyntaxEditPaintManager.cpp" in
function "CXTPSyntaxEditPaintManager::DrawLineTextEx" ca. in line 1023:
 
Replace:
 
    ...
    if (!pDC->IsPrinting())
    {
         // draw selection for virtual space, after line text end)
        ...
with
 
    ...
    if (!pDC->IsPrinting() && pEditCtrl->IsEnabledVirtualSpace ())   
    {
         // draw selection for virtual space, after line text end)
        ...
Because as the comment already states:
The following drawing code should only be for virtual space and if I have NOT
it disabled, it draws - in my opinion - wrong and confusing things.
So I simply so not execute this special drawing code when I don't have virtual space.
 
Best regards
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.