about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-05-04 22:46:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-05-04 22:46:55 +0000
commit7d8eb45b18aa9da41f8a50058c3487a563058440 (patch)
tree8dff8dcd3ad74c35ffb08a0545155e5a7153ffc3
parentbb8ec071e303f0c89549a676ec0bdbaaea707567 (diff)
downloadzsh-7d8eb45b18aa9da41f8a50058c3487a563058440.tar.gz
zsh-7d8eb45b18aa9da41f8a50058c3487a563058440.tar.xz
zsh-7d8eb45b18aa9da41f8a50058c3487a563058440.zip
Mikael Magnusson: 24911 (slightly tweaked):
REGION_ACTIVE zle parameter
-rw-r--r--Src/Zle/zle_params.c17
1 files changed, 17 insertions, 0 deletions
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 },
@@ -249,6 +252,20 @@ get_mark(UNUSED(Param pm))
 
 /**/
 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)
 {
     ZLE_STRING_T y;