[ nedit-Bugs-1608609 ] a trivial display bug

SourceForge.net noreply at sourceforge.net
Mon Mar 5 00:44:54 CET 2007


Bugs item #1608609, was opened at 2006-12-04 18:16
Message generated for change (Settings changed) made by yooden
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1608609&group_id=11005

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: development
>Status: Closed
>Resolution: Fixed
Priority: 9
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Thorsten Haude (yooden)
Summary: a trivial display bug

Initial Comment:
NEdit release of Aug 20, 2004

     Built on: Linux, 386, Intel C++
     Built at: Dec  4 2006, 10:24:13
   With Motif: 2.2.3 [@(#)Motif Version 2.2.4]
Running Motif: 2.2 [unknown]
       Server: The X.Org Foundation 60802000
       Visual: 24-bit TrueColor (ID 0x21, Default)
       Locale: en_US.UTF-8
---------------------------------------------

1) set the textNblinkRate in "text.c" to "0" and compile all the source code to have an executable;

2) make sure in the Preferences the "Show Matching"->"Delimiter" is on;

3) open a new file and type "()", you'll notice the cursor is erased.



----------------------------------------------------------------------

Comment By: Thorsten Haude (yooden)
Date: 2007-01-09 00:01

Message:
Logged In: YES 
user_id=119143
Originator: NO

I think the fix in bufModifiedCB() would be much more expensive. It's two
function up the call stack which means that both textDRedisplayRange() and
redisplayLine() would have to be run once more each.

In my main test case I noticed that bufModifiedCB() was the culprit
howver; after the whole areas was updated, TextDRedisplayRange() was called
once more from bufModifiedCB(), erasing the cursor as described in
SF#464967. Also, redisplayLine() is called several hundred times at startup
with an empty document, so there is definitely room to optimize.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2007-01-08 17:11

Message:
Logged In: NO 

It works fine. Thanks!

There is another fix for this trivial thing:



Index: textDisp.c
===================================================================
RCS file: /cvsroot/nedit/nedit/source/textDisp.c,v
retrieving revision 1.68
diff --unified=5 -r1.68 textDisp.c
--- textDisp.c  7 Jan 2007 13:18:12 -0000       1.68
+++ textDisp.c  8 Jan 2007 16:08:58 -0000
@@ -1649,10 +1649,11 @@
     if (textD->styleBuffer)
        extendRangeForStyleMods(textD, &startDispPos, &endDispPos);

     /* Redisplay computed range */
     textDRedisplayRange(textD, startDispPos, endDispPos);
+    textDRedisplayRange(textD, textD->cursorPos-1, textD->cursorPos+1);
 }

 /*
 ** In continuous wrap mode, internal line numbers are calculated after
 ** wrapping.  A separate non-wrapped line count is maintained when line





It also works fine is not an efficient solution. I don't know if this
imply something.

Thanks Again.



----------------------------------------------------------------------

Comment By: Thorsten Haude (yooden)
Date: 2007-01-07 10:43

Message:
Logged In: YES 
user_id=119143
Originator: NO

It was simpler than I feared it to be. I played around it a bit in various
configurations, but (since this is the third attempt) please check this in
whatever situation you can think of.
File Added: eraseCursor.2007-01-07.1.diff

----------------------------------------------------------------------

Comment By: Thorsten Haude (yooden)
Date: 2007-01-05 15:58

Message:
Logged In: YES 
user_id=119143
Originator: NO

Well, it's only kind of a regression bug, we can easily switch it for the
non-regression bug SF#464967. The fixed fix for SF#464967 (done on
SF#1368576) increased the area redisplayed in many cases by one, but
TextDRedisplayRange()'s comment promises not to include the character at
the position "end".

So SF#464967 should probably really be fixed in redisplayLine() (called
"very complex" by Eddy, sigh), which does not seem to keep its promise to
redraw the cursor if it appears on the line (which Eddy pointed out all
along, doh).

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-12-08 01:02

Message:
Logged In: NO 

?

----------------------------------------------------------------------

Comment By: Thorsten Haude (yooden)
Date: 2006-12-06 20:44

Message:
Logged In: YES 
user_id=119143
Originator: NO

Regression, so it should go.

----------------------------------------------------------------------

Comment By: Thorsten Haude (yooden)
Date: 2006-12-06 20:41

Message:
Logged In: YES 
user_id=119143
Originator: NO

No need to recompile, 
    nedit -xrm "nedit*text.blinkRate: 0"
should do the trick.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-12-04 18:38

Message:
Logged In: NO 

Might has something to do with the fixes for SF#1368576 and SF#464967.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-12-04 18:17

Message:
Logged In: NO 

No problem with "( )".

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1608609&group_id=11005


More information about the Develop mailing list