Subject: Widget musings
From: Bart Schaefer <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Thu, 23 Jun 2016 15:34:29 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

[I'm having some trouble connecting to my SMTP server from home,
so I'm pasting this into gmail.  Apologies if the formatting gets weird or
if a nearly-identical message appears later if things suddenly start
working again.]

On Jun 22, 10:11pm, Oliver Kiddle wrote:
}
} I've just noticed that we also need to account for the cursor being at
} the beginning of a line other than the first one

"Cursor is at [beginning, end] of a line" seems to be a pretty common
thing to want to test.  Maybe the zsh/zleparameter module should define
some condition codes so one could write stuff like

    if [[ -bol CURSOR && -eol MARK ]]; then

Aside:  The zsh/complete module defines -prefix -suffix -between and
-after but only -prefix is ever used by the shell code.

On Jun 23, 12:29am, Oliver Kiddle wrote:
}
} The custom cutbuffer widget is not marked as being a vi operator so gets
} invoked as soon as you press y. Currently, I can't think of an easy fix
} for this.

Per recent discussion about why add-zle-hook-widget is not suitable for
"non-special" widgets:  Part of the criteria for an action-widget hook
should be that flags on the hook'd widget, such as "is a vi operator",
persist across execution of the hook.