Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] zle: Call zle-line-pre-redraw after inserting a completion result
- X-seq: zsh-workers 39590
- From: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] zle: Call zle-line-pre-redraw after inserting a completion result
- Date: Sat, 8 Oct 2016 19:30:16 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version; bh=KvvS8ldlisWiqDwhG2Tg6dDuebuVfKL8aPyO7P516aY=; b=xUmfPckQcvexRKfh7tjePWyIBr6EozjTUhzEbZrZyydEJa+lXSFwTijsPUHgxsqVDd 5ylI6tc0cNa2r1P9tA1AFr6S9+diSG14CyBH2GCiRvpzG+VD/JTszFzGXulh2oNfQAgn cgQGZFHWr5w7UwZFseEN55TOazkNux+dVb2RzyxY+eTd6qsT/AJSx/71zCjmnrTQbH7R whU3hGKdItaqB49NC5INAlcUIyKpUXxmAuDfHluoGNwc+KgVZ7QVe/eI2nPImzth+hwW MnjbxdcaZZe4kE7n2ILb6+5SBbQk5BZEhFxEoFC6Wqn1sSxtDGxPSeCgQKelS4alcchI nhiw==
- 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
This patch originated from a zsh-synatx-highlighting issue:
https://github.com/zsh-users/zsh-syntax-highlighting/issues/375
I think redrawhook() should be called at the end of do_single()
to make sure that zle-line-pre-redraw is run when cycling the results of
a menu completion.
By the way (unrelated):
The hooks (which served me as entry point for finding the right spot for
the path)
#define INSERTMATCHHOOK (comphooks + 0)
#define MENUSTARTHOOK (comphooks + 1)
#define COMPCTLMAKEHOOK (comphooks + 2)
#define COMPCTLCLEANUPHOOK (comphooks + 3)
#define COMPLISTMATCHESHOOK (comphooks + 4)
...
struct hookdef comphooks[] = {
HOOKDEF("insert_match", NULL, HOOKF_ALL),
HOOKDEF("menu_start", NULL, HOOKF_ALL),
HOOKDEF("compctl_make", NULL, 0),
HOOKDEF("compctl_cleanup", NULL, 0),
HOOKDEF("comp_list_matches", ilistmatches, 0),
};
seem to be undocumented.
From 6c1e1fe71011f8617a85fb2d53b7a36c8fcd0d07 Mon Sep 17 00:00:00 2001
From: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
Date: Sat, 8 Oct 2016 18:53:55 +0200
Subject: [PATCH] zle: Call zle-line-pre-redraw after inserting a completion
result
This is necessary to make sure redrawhook() is called while
cycling results in menu completion.
---
Src/Zle/compresult.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 7fec7c8..b7ec18f 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1191,6 +1191,7 @@ do_single(Cmatch m)
if (menucmp)
minfo.cur = &m;
runhookdef(INSERTMATCHHOOK, (void *) &dat);
+ redrawhook();
minfo.cur = om;
}
}
--
2.8.3
Messages sorted by:
Reverse Date,
Date,
Thread,
Author