about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_thingy.c8
-rw-r--r--Src/Zle/zle_tricky.c4
2 files changed, 2 insertions, 10 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index 4f1bb03f2..f753b4769 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -399,10 +399,6 @@ bin_zle_refresh(char *name, char **args, char *ops, char func)
     char *s = statusline;
     int sl = statusll, ocl = clearlist;
 
-    if (!zleactive) {
-	zerrnam(name, "can only be called from widget function", NULL, 0);
-	return 1;
-    }
     statusline = NULL;
     statusll = 0;
     if (*args) {
@@ -439,10 +435,6 @@ bin_zle_unget(char *name, char **args, char *ops, char func)
 {
     char *p = *args;
 
-    if (!zleactive) {
-	zerrnam(name, "can only be called from widget function", NULL, 0);
-	return 1;
-    }
     while (*p)
 	ungetkey((int) *p++);
     return 0;
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 672b049f7..652ef24c1 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -874,8 +874,6 @@ docomplete(int lst)
     metafy_line();
 
     ocs = cs;
-    origline = dupstring((char *) line);
-    origcs = cs;
     if (!isfirstln && chline != NULL) {
 	/* If we are completing in a multi-line buffer (which was not  *
 	 * taken from the history), we have to prepend the stuff saved *
@@ -899,6 +897,8 @@ docomplete(int lst)
     autoq = '\0';
     /* Get the word to complete. */
     noerrs = 1;
+    origline = dupstring((char *) line);
+    origcs = cs;
     s = get_comp_string();
     DPUTS(wb < 0 || cs < wb || cs > we,
 	  "BUG: 0 <= wb <= cs <= we is not true!");