Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: make vimatchbracket more useful in emacs mode
- X-seq: zsh-workers 29208
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: make vimatchbracket more useful in emacs mode
- Date: Tue, 10 May 2011 00:13:30 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=vJahJku7qCyx29BnuXL1Op7TQjQNPgKmum7uljkkm98=; b=Mz3aGOQVB+L/10RBqxsD56kExplG25DEIYOQTzWDVrvFTxhF1+CLQ9f7mx8t8ro06O M8OJgfOpgrCVMlzQmv8GLlstRATmkCNbMYXmDx7cUbSf4Jsu9XGQOgequzqD+e7bSt12 Y27xgWHjU7BpkhbhDXyO16fe8WnIOkLUfk0lo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=BEVbZq1Ybrff/NoKJntzzv5hByPm+yNdZWbnMBY/xrzo1vSOJJK172MBocKtGBmfmX 2zD5luAuAWR1lInHzpNi/Qznx9DU1/xn1RbHHFcuGZ4mg1+CujPnDh0nCCHFB0FAXd1M tbipHuocSR5Yo6AcoTbfn6ooRhaQDkhKsuPsU=
- 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
When typing stuff in vi mode, then pressing esc%, vimatchbracket works
because the cursor jumps back a step, but in emacs mode it stays
"after" the character and nothing happens when you press ^X^B unless
you go left first, which is annoying. I don't think this will break
anything?
--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -536,6 +536,9 @@ vimatchbracket(UNUSED(char **args))
int ocs = zlecs, dir, ct;
unsigned char oth, me;
+ if ((zlecs == zlell || zleline[zlecs] == '\n') && zlecs > 0)
+ DECCS();
+
otog:
if (zlecs == zlell || zleline[zlecs] == '\n') {
zlecs = ocs;
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author