Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "drop-in replacement" and transpose-words-match
- X-seq: zsh-workers 37686
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: "drop-in replacement" and transpose-words-match
- Date: Mon, 18 Jan 2016 22:31:26 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=He2KaRdNWbl06fvjBMmhVMaIN7/bUcwtFZ6GEm58ilE=; b=Y1fys3sBkLfNuK8K2UioN4bNdplN4RbUQf8JGPes+scBh5UuIids78b11yAE/vKBFs z2pw+vJI0F3O8nq2SUm6+B6mIxFbhc1mb7th4wrFh7LJ4hXiSQY/JcOd9KF7e5zM0lel DsQSi26lo24uZ/hcGkGD5f8lpyE5laXtvhddqERPxB8KoX0MTTYuxeDbpLCGdIFqjKE2 pyJ1yMQRKaeYwxlxDThgiAujdaNYLdxDPtoSp/w4WZpBfArS+iaxMqiFCF97k406DN5P ekE9mAeJy8lrEt13a1yn5Hqp5VRHNE6uEZVXQamdZHJLaueO5hwQoVnFjmv5yzAjqwUe q29Q==
- In-reply-to: <CAKc7PVDhxbVgmV7WcGgyDzMmWSjwQ=7=LExXTwr7YvPzPpn2RA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <160111233259.ZM6719@torch.brasslantern.com> <CAKc7PVDhxbVgmV7WcGgyDzMmWSjwQ=7=LExXTwr7YvPzPpn2RA@mail.gmail.com>
On Jan 18, 6:04pm, Sebastian Gniazdowski wrote:
}
} My point is: isn't it that sticking to LBUFFER is the source of
} various problems? Its use is always more or less hackish and has
} effects like "you should position cursor on beginning of a word to
} swap it". Implementation generates features while it should be the
} opposite.
Sorry, I can't agree. By *FAR* the most common editing operation is
to either either insert or delete to the left of the cursor position,
which means at the end of LBUFFER.
Furthermore, zew-process-buffer always manipulates whatever the (z)
flag's idea of a "word" is, which [as the "bufferwords()" thread has
demonstrated] is somewhat tenuously defined, and may not correspond
to what the user wants to consider a "word" (see e.g. $WORDCHARS).
[I would probably save CURSOR and MARK, set CURSOR to zero, then loop
on "zle forward-word" until I reached or passed the old CURSOR, rather
than try to match up the results of (Z:n:) to $BUFFER. Then restore
CURSOR and MARK, of course.]
Messages sorted by:
Reverse Date,
Date,
Thread,
Author