🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #985

Epoch 4.2 Bug in vertical-motion

#985
From: Eric Eide
Date: Thu, 04 Mar 1993 17:19
40 lines
2438 bytes
Today I discovered a bug in Epoch 4.2's vertical-motion function.  For lines
that are wrapped, Epoch's vertical-motion doesn't correctly move point to the
beginning of the window line.

I haven't examined the code, but what appears to be happening is that when
vertical-motion is given a positive argument, point is moved directly down,
plus an off-by-one error.  So if point is at the start of "This" is the wrapped
sentence:

  This is a wrapped, \
  wrapped, wrapped,  \
  wrapped sentence.

(where `/' is the wrap character), executing (vertical-motion 1) causes point
to be moved onto the first `r' on the second line.  Doing (vertical-motion 1) a
second time causes point to be moved onto the first `a' on the third line.

If point starts at the space between "This" and "is," (vertical-motion 1) moves
point to the first `e' on the second line.  Doing it again moves point to the
`d' on the third line.

If point starts at the beginning of "This," (vertical-motion 2) moves point
onto the `r' in the third line.  (So the off-by-one error seems to be per
invocation of vertical-motion, not per screen line.)

Epoch's vertical-motion has a different kind of error when given a negative
argument.  If point is anywhere on the third line above, (vertical-motion -1)
moves point onto the first `r' in the second line.  So it goes to the beginning
of the line, except for that nasty off-by-one error again.

I can't believe that this hasn't been reported before now -- does anybody have
a fix?  This bug causes my recently-posted "scroll-in-place.el" package to
behave badly under Epoch 4.2.

Eric.

--
-------------------------------------------------------------------------------
Eric Eide          |          University of Utah Department of Computer Science
eeide@cs.utah.edu  | Buddhist to hot dog vendor: "Make me one with everything."
Technical Details
Message-ID: <EEIDE.93Mar4171922@asylum.cs.utah.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!portal!sdd.hp.com!usc!cs.utexas.edu!hellgate.utah.edu!eeide

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,bb876761c5f09523,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1993-03-05 15:54:19 PST
Newsgroups: gnu.epoch.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!portal!sdd.hp.com!usc!cs.utexas.edu!hellgate.utah.edu!eeide
From: eeide%asylum.cs.utah.edu@cs.utah.edu (Eric Eide)
Subject: Epoch 4.2 Bug in vertical-motion
Message-ID: <EEIDE.93Mar4171922@asylum.cs.utah.edu>
Organization: University of Utah Department of Computer Science
Distribution: gnu
Date: 4 Mar 93 17:19:22
Lines: 40