mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-01 22:05:08 +00:00
f118640d86
lines, since the WORTHLESS, BROKEN new version of patch ignores them.
24 lines
813 B
Plaintext
24 lines
813 B
Plaintext
This fixes a bug which can result in a value out of range error if the
|
|
cursor is at the beginning of a TextPort and the DeleteToStartOfLine
|
|
procedure is invoked.
|
|
|
|
This patch has been sent to SRC.
|
|
|
|
--- m3/vbtkit/src/etext/TextPortClass.m3.orig Mon Jan 30 14:34:34 1995
|
|
+++ m3/vbtkit/src/etext/TextPortClass.m3 Thu May 8 17:20:58 1997
|
|
@@ -271,8 +271,12 @@
|
|
left := MTextUnit.StartOfLine (v.vtext.mtext, here);
|
|
BEGIN
|
|
IF here = left THEN
|
|
- (* We're already at the start of line; delete one char. *)
|
|
- RETURN v.replace (here - 1, here, "")
|
|
+ (* Already at the start of line; delete preceding newline if any. *)
|
|
+ IF here > 0 THEN
|
|
+ RETURN v.replace (here - 1, here, "")
|
|
+ ELSE
|
|
+ RETURN NotFound
|
|
+ END
|
|
ELSE
|
|
RETURN v.replace (left, here, "")
|
|
END
|