zsh-workers
 help / color / mirror / code / Atom feed
* Widget musings
@ 2016-06-23 22:34 Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-06-23 22:34 UTC (permalink / raw)
  To: Zsh hackers list

[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.


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

* Widget musings
       [not found]                   ` <27903.1466634569@thecus.kiddle.eu>
@ 2016-06-23  4:52                     ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-06-23  4:52 UTC (permalink / raw)
  To: zsh-workers

[>workers]

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.


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

end of thread, other threads:[~2016-06-25 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-23 22:34 Widget musings Bart Schaefer
     [not found] <CAEwkUWMnBO7_6EOo5y5b1eMAZB6uXkgXsh51OqtuEbbUQQPRyQ@mail.gmail.com>
     [not found] ` <21997.1466550647@thecus.kiddle.eu>
     [not found]   ` <160621234233.ZM10369@torch.brasslantern.com>
     [not found]     ` <CAEwkUWM0O2Wzh1rYPUK4HU3P5MxZHJnA-5NT+Mow_3oMQbtwag@mail.gmail.com>
     [not found]       ` <CAEwkUWNw=oYJs7NV7c8ZTQp+j6CHrtUsDEcMaH+vVVWpdEof_w@mail.gmail.com>
     [not found]         ` <25350.1466608182@thecus.kiddle.eu>
     [not found]           ` <CAEwkUWOAvbT4xydtG6EZYRS3tOuur1LZ3tJAx97jR8zgFBjsyw@mail.gmail.com>
     [not found]             ` <26676.1466626292@thecus.kiddle.eu>
     [not found]               ` <CAEwkUWPHhDKyzfAUmZaTFGcaW3NOyE_uWTR4Nk1KD0=8jgiFhA@mail.gmail.com>
     [not found]                 ` <CAEwkUWMwSBQhhuQHVOjNqqGUce40kN5f1thvGTriWDo2YB++Cg@mail.gmail.com>
     [not found]                   ` <27903.1466634569@thecus.kiddle.eu>
2016-06-23  4:52                     ` 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).