TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: `THOMAS SWANN, TPA ENGINEERING, 813
date: 1997-08-29 19:30:00
subject: Mark Char Bug?

From: "Thomas Swann, TPA Engineering, 813-532-2632" 

Hello All,
   I have found an odd behavior of the MarkChar() function.  This problem
is specifically happening when using the CUAMARK macro.  When you mark
text going forward in the file and then hit a character key, you get the
behavior you would expect (ie the marked text is replaced with the 
character you typed).  However if you mark text going towards the start
of the file and then do the same thing, you get *two* of the character
you hit.  This appears to be a problem with the MarkChar() function.
MarkChar() is supposed to be a non-inclusive mark so that the character
under the cursor is not part of the block.  This is true when you move
forward in the file (ie. left to right or up to down), but when you move
from right to left or down to up the character under the cursor is in
fact marked.  It all appears to be the way CUA works (at least DOS edit),
but when you Query() the "BlockBegCol" (the applicable variable for when
you move back in the file) you find that even though the character under
the cursor is marked (highlighted) that it isnt part of the block (which
is what one would expect for a non-inclusive block).  The real problem
lies hidden somewhere.  When InsertText() is called to replace the marked
block with the key that was pressed.  My guess is that it first replaces
the formal non-inclusive block with the character and then somehow sees the
character under the cursor as a block too (its highlighted afterall) and 
replaces that char as well (resulting in the duplication of the key).
If someone at Semware or one of the real SAL guru's could explain to me 
what is going on here, I would really appreciate it.
Thomas Swann
thomas_s1@verifone.com
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.