Print Page | Close Window

Bad drawing of selection after end of line

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=14085
Printed Date: 23 November 2024 at 9:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bad drawing of selection after end of line
Posted By: peerschindel
Subject: Bad drawing of selection after end of line
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net