zsh-workers
 help / color / mirror / code / Atom feed
* Bugs in vi-delete and vi-put-*
@ 1998-11-22  2:15 Bart Schaefer
  1998-11-22  3:27 ` Phil Pennock
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 1998-11-22  2:15 UTC (permalink / raw)
  To: zsh-workers

Sorry, no patches this time, just a report.

Starting with:

  zagzig[42] bindkey -v
  zagzig[43] echo this is a line

cursor after "line", type ESC dd P j.  Note that you end up on the line
below the prompt, even though there was no newline in what was deleted.
Now type p.  Note that you end up with:

  zagzig[43] echo this is a line

  echo this is a line

with the cursor between the two lines.  So far 3.0.5 and 3.1.5 have the
same bug.  Type j j, note feep on second attempt to move down a line.
Now type k dd.  In 3.0.5, the blank line is deleted, but in 3.1.5 all you
get is a feep.  The only way to get rid of the blank line in 3.1.5 is to
move up to the previous line and type J.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bugs in vi-delete and vi-put-*
  1998-11-22  2:15 Bugs in vi-delete and vi-put-* Bart Schaefer
@ 1998-11-22  3:27 ` Phil Pennock
  1998-11-22  4:04   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Pennock @ 1998-11-22  3:27 UTC (permalink / raw)
  To: zsh-workers

On Sat, Nov 21, 1998 at 06:15:15PM -0800, Bart Schaefer wrote:
> cursor after "line", type ESC dd P j.  Note that you end up on the line
> below the prompt, even though there was no newline in what was deleted.
> Now type p.  Note that you end up with:

This is consistent with vi.  dd deletes current line, including newline.
If you type dd on a line /with content/ in a multiline command, that
line is deleted.  Your point about a feep on an empty line is noted.

It looks as though you want dd, when there is only one line, to behave
like 0d$ -- special case it?

HTH
-- 
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bugs in vi-delete and vi-put-*
  1998-11-22  3:27 ` Phil Pennock
@ 1998-11-22  4:04   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1998-11-22  4:04 UTC (permalink / raw)
  To: Phil Pennock, zsh-workers

On Nov 22,  3:27am, Phil Pennock wrote:
} Subject: Re: Bugs in vi-delete and vi-put-*
}
} On Sat, Nov 21, 1998 at 06:15:15PM -0800, Bart Schaefer wrote:
} > cursor after "line", type ESC dd P j.  Note that you end up on the line
} > below the prompt, even though there was no newline in what was deleted.
} 
} This is consistent with vi.  dd deletes current line, including newline.

Yes, I know.  The problem is not that dd includes the newline, it's that
there's still a phantom newline left behind when the buffer is "empty."
I worded the "even though" clause badly.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-11-22  4:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-22  2:15 Bugs in vi-delete and vi-put-* Bart Schaefer
1998-11-22  3:27 ` Phil Pennock
1998-11-22  4:04   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).