summaryrefslogtreecommitdiff
path: root/Src/Zle/zle_params.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-09-11 21:51:49 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-09-11 21:51:49 +0200
commit7534dfa8848251305ad2914c338f232050f6a500 (patch)
treee693cdc8e3eaa157574c10de89a94a3547faa78e /Src/Zle/zle_params.c
parent63deeaba7e4ae09b81d933985152c4240ae08d25 (diff)
parent68405f31a043bdd5bf338eb06688ed3e1f740937 (diff)
downloadzsh-7534dfa8848251305ad2914c338f232050f6a500.tar.gz
zsh-7534dfa8848251305ad2914c338f232050f6a500.zip
Merge tag 'zsh-5.1.1' into debian
Diffstat (limited to 'Src/Zle/zle_params.c')
-rw-r--r--Src/Zle/zle_params.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c
index b84e72088..000bc388c 100644
--- a/Src/Zle/zle_params.c
+++ b/Src/Zle/zle_params.c
@@ -97,6 +97,12 @@ static const struct gsu_integer undo_change_no_gsu =
{ get_undo_current_change, NULL, zleunsetfn };
static const struct gsu_integer undo_limit_no_gsu =
{ get_undo_limit_change, set_undo_limit_change, zleunsetfn };
+static const struct gsu_integer yankstart_gsu =
+{ get_yankstart, NULL, zleunsetfn };
+static const struct gsu_integer yankend_gsu =
+{ get_yankend, NULL, zleunsetfn };
+static const struct gsu_integer yankactive_gsu =
+{ get_yankactive, NULL, zleunsetfn };
static const struct gsu_array killring_gsu =
{ get_killring, set_killring, unset_killring };
@@ -143,6 +149,9 @@ static struct zleparam {
{ "WIDGET", PM_SCALAR | PM_READONLY, GSU(widget_gsu), NULL },
{ "WIDGETFUNC", PM_SCALAR | PM_READONLY, GSU(widgetfunc_gsu), NULL },
{ "WIDGETSTYLE", PM_SCALAR | PM_READONLY, GSU(widgetstyle_gsu), NULL },
+ { "YANK_START", PM_INTEGER | PM_READONLY, GSU(yankstart_gsu), NULL },
+ { "YANK_END", PM_INTEGER | PM_READONLY, GSU(yankend_gsu), NULL },
+ { "YANK_ACTIVE", PM_INTEGER | PM_READONLY, GSU(yankactive_gsu), NULL },
{ "ZLE_STATE", PM_SCALAR | PM_READONLY, GSU(zle_state_gsu), NULL },
{ NULL, 0, NULL, NULL }
};
@@ -477,6 +486,27 @@ get_pending(UNUSED(Param pm))
}
/**/
+static zlong
+get_yankstart(UNUSED(Param pm))
+{
+ return yankb;
+}
+
+/**/
+static zlong
+get_yankend(UNUSED(Param pm))
+{
+ return yanke;
+}
+
+/**/
+static zlong
+get_yankactive(UNUSED(Param pm))
+{
+ return lastcmd & ZLE_YANK;
+}
+
+/**/
static char *
get_cutbuffer(UNUSED(Param pm))
{