summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/input.c10
-rw-r--r--src/input.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c
index ffba346..41b4e2e 100644
--- a/src/input.c
+++ b/src/input.c
@@ -161,6 +161,12 @@ update_input_window (screen_info *s, char *prompt, char *input, int input_len)
char *
get_input (char *prompt)
{
+ return get_more_input (prompt, "");
+}
+
+char *
+get_more_input (char *prompt, char *preinput)
+{
screen_info *s = current_screen ();
int cur_len = 0; /* Current length of the string. */
int allocated_len=100; /* The amount of memory we allocated for str */
@@ -178,6 +184,10 @@ get_input (char *prompt)
exit (EXIT_FAILURE);
}
+ /* load in the preinput */
+ strcpy (str, preinput);
+ cur_len = strlen (preinput);
+
/* We don't want to draw overtop of the program bar. */
hide_bar (s);
diff --git a/src/input.h b/src/input.h
index dd7c44b..3a21471 100644
--- a/src/input.h
+++ b/src/input.h
@@ -25,6 +25,7 @@
char *keysym_to_string (KeySym keysym, unsigned int modifier);
void cook_keycode (KeyCode keycode, KeySym *keysym, unsigned int *mod);
char *get_input (char *prompt);
+char *get_more_input (char *prompt, char *preinput);
void read_key (KeySym *keysym, unsigned int *mode);
#endif /* ! _RATPOISON_INPUT_H */