summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-09-13 10:32:18 +0000
committersabetts <sabetts>2001-09-13 10:32:18 +0000
commit20b25a51550f3361e3cdd0608b1801cb56f09bf2 (patch)
treefaff564b7e1061fc3f8ff838fe037460d6d493f3
parent6f4a5fd3982be29a1fe0c33016355f07fdfd7678 (diff)
downloadratpoison-20b25a51550f3361e3cdd0608b1801cb56f09bf2.zip
* src/actions.c (command): Gobble the whitespace between the
command and the argument list. Code that did this in specific commands has been removed. * src/input.c (update_input_window): Draw a cheap-o cursor
-rw-r--r--ChangeLog8
-rw-r--r--NEWS3
-rw-r--r--src/actions.c13
-rw-r--r--src/input.c7
4 files changed, 28 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0688a34..d6c7ebb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-09-13 shawn <sabetts@diggin.lamenet.tmp>
+
+ * src/actions.c (command): Gobble the whitespace between the
+ command and the argument list. Code that did this in specific
+ commands has been removed.
+
+ * src/input.c (update_input_window): Draw a cheap-o cursor
+
2001-09-09 shawn <sabetts@diggin.lamenet.tmp>
* src/conf.h (MAXSIZE_WINDOWS_ARE_TRANSIENTS): defined
diff --git a/NEWS b/NEWS
index f99bd89..740f4ea 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
ratpoison NEWS --- history of user-visible changes. -*- outline -*-
* Changes since 1.0.0
+** Cursor in the input window
+There is now a cheap cursor to help you remember where you are.
+
** conf.h compile-time customizations moved
They are now accessible through the def* suite of commands.
diff --git a/src/actions.c b/src/actions.c
index 91efce0..e3101a6 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -778,6 +778,16 @@ command (int interactive, char *data)
rest = strtok (NULL, "\0");
+ /* Gobble whitespace */
+ if (rest)
+ {
+ while (*rest == ' ')
+ rest++;
+ /* If rest is empty, then we have no argument. */
+ if (*rest == '\0')
+ rest = NULL;
+ }
+
PRINT_DEBUG ("cmd==%s rest==%s\n", cmd, (char*)rest);
/* find the command */
@@ -1666,10 +1676,7 @@ cmd_defwinname (int interactive, void *data)
return NULL;
}
- /* Gobble whitespace */
name = (char *)data;
- while (*name == ' ')
- name++;
/* FIXME: Using strncmp is sorta dirty since `title' and
`titlefoobar' would both match. But its quick and dirty. */
diff --git a/src/input.c b/src/input.c
index 4e2ba4e..811bfdd 100644
--- a/src/input.c
+++ b/src/input.c
@@ -310,6 +310,13 @@ update_input_window (screen_info *s, char *prompt, char *input, int input_len)
defaults.bar_x_padding + prompt_width,
defaults.bar_y_padding + defaults.font->max_bounds.ascent, input,
input_len);
+
+ /* Draw a cheap-o cursor. */
+ XDrawLine (dpy, s->input_window, s->normal_gc,
+ defaults.bar_x_padding * 2 + prompt_width + input_width + 2,
+ defaults.bar_y_padding + 1,
+ defaults.bar_x_padding * 2 + prompt_width + input_width + 2,
+ defaults.bar_y_padding + FONT_HEIGHT (defaults.font) - 1);
}
char *