From 7d8eb45b18aa9da41f8a50058c3487a563058440 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 4 May 2008 22:46:55 +0000 Subject: Mikael Magnusson: 24911 (slightly tweaked): REGION_ACTIVE zle parameter --- Src/Zle/zle_params.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Src/Zle') diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c index f46a02f05..efa628693 100644 --- a/Src/Zle/zle_params.c +++ b/Src/Zle/zle_params.c @@ -87,6 +87,8 @@ static const struct gsu_integer numeric_gsu = { get_numeric, set_numeric, unset_numeric }; static const struct gsu_integer pending_gsu = { get_pending, NULL, zleunsetfn }; +static const struct gsu_integer region_active_gsu = +{ get_region_active, set_region_active, zleunsetfn }; static const struct gsu_array killring_gsu = { get_killring, set_killring, unset_killring }; @@ -123,6 +125,7 @@ static struct zleparam { { "PREBUFFER", PM_SCALAR | PM_READONLY, GSU(prebuffer_gsu), NULL }, { "PREDISPLAY", PM_SCALAR, GSU(predisplay_gsu), NULL }, { "RBUFFER", PM_SCALAR, GSU(rbuffer_gsu), NULL }, + { "REGION_ACTIVE", PM_INTEGER, GSU(region_active_gsu), NULL}, { "region_highlight", PM_ARRAY, GSU(region_highlight_gsu), NULL }, { "WIDGET", PM_SCALAR | PM_READONLY, GSU(widget_gsu), NULL }, { "WIDGETFUNC", PM_SCALAR | PM_READONLY, GSU(widgetfunc_gsu), NULL }, @@ -247,6 +250,20 @@ get_mark(UNUSED(Param pm)) return mark; } +/**/ +static void +set_region_active(UNUSED(Param pm), zlong x) +{ + region_active = (int)!!x; +} + +/**/ +static zlong +get_region_active(UNUSED(Param pm)) +{ + return region_active; +} + /**/ static void set_lbuffer(UNUSED(Param pm), char *x) -- cgit 1.4.1