home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!cs.utexas.edu!natinst.com!stepan
- From: stepan@natinst.com (Stepan Riha)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: TextEdit bug in 7.0
- Message-ID: <1992Aug14.214312.22890@natinst.com>
- Date: 14 Aug 92 21:43:12 GMT
- References: <1992Aug14.204628.12494@pollux.lu.se>
- Sender: news@natinst.com
- Organization: National Instruments, Austin, TX
- Lines: 34
- Nntp-Posting-Host: falcon.natinst.com
-
- In article <1992Aug14.204628.12494@pollux.lu.se> roland.mansson@ldc.lu.se (Roland Mansson) writes:
- >I think I've found a bug in TextEdit in System 7. I've verified it by
- >booting of the System Tools disk (S-7.0.1) and running TeachText (S-7.0).
- >
- >The bug is that sometimes when moving the insertion point with the left
- >arrow key, the insertion point ends up in a wrong position.
- >
- >What happens is that (sometimes) when the insertion point is between char
- >1 and 2 of a line and you press the left arrow key, the insertion point
- >moves to the end of the previous line (ie not to before char 1 on the
- >current line, as it should).
- >
- :
- >Is this a know bug? Is there a workaround? My main concern is not
- >TeachText, but I have the same problem in my own app.
-
- This is NOT a bug but is described in detail in IM VI pp. 15-6 through 15-8.
- The problem is that "a single caret position can correspond to two character
- offsets." The trailing edge of character N and the leading edge of character
- N+1 would have the same caret position (in left-to-right text).
- You'll notice that your problem only occurs if you click on the left side of
- a character and then use the arrows to get to the end of the line.
- So if your caret is on the trailing edge of the 1st character on a line and
- you move it left, it's going to be on the trailing edge of the last character
- on the previous line, i.e. at the right line end.
- I wish, though, that Apple would check for the special case when the last
- character of the previous line is a '\r', and would say that the trailing
- edge of a '\r' is actually the beginning of the next line. Right now the
- carret stays at the right line end and you have to hit the arrow key TWICE
- without any visual feedback :-(
-
- Stepan
- --
- Stepan Riha -- stepan@natinst.com
-