summaryrefslogtreecommitdiff
path: root/src/completions.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2006-03-16 00:33:34 +0000
committersabetts <sabetts>2006-03-16 00:33:34 +0000
commit9cb1a3d51b8cba35ef443c64b5b1d99fa8d33ae6 (patch)
treec6b2230a429ae887eed80487d1833c1eec129447 /src/completions.c
parent0ad6d8b36f975c43f37b0ad07112c2cd31003417 (diff)
downloadratpoison-9cb1a3d51b8cba35ef443c64b5b1d99fa8d33ae6.zip
remove tabs and trailing whitespace.
Diffstat (limited to 'src/completions.c')
-rw-r--r--src/completions.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/completions.c b/src/completions.c
index 4c62d71..fc32c38 100644
--- a/src/completions.c
+++ b/src/completions.c
@@ -35,7 +35,7 @@ completions_new (completion_fn list_fn)
c->last_match = NULL;
c->partial = NULL;
c->virgin = 1;
-
+
return c;
}
@@ -110,12 +110,12 @@ completions_prev_match (rp_completions *c)
cur = list_prev_entry (cur, &c->completion_list, node))
{
if (str_comp (sbuf_get (cur), c->partial, strlen (c->partial)))
- {
- /* We found a match so update our last_match pointer and
- return the string. */
- c->last_match = cur;
- return sbuf_get (cur);
- }
+ {
+ /* We found a match so update our last_match pointer and
+ return the string. */
+ c->last_match = cur;
+ return sbuf_get (cur);
+ }
}
return NULL;
@@ -133,12 +133,12 @@ completions_next_match (rp_completions *c)
cur = list_next_entry (cur, &c->completion_list, node))
{
if (str_comp (sbuf_get (cur), c->partial, strlen (c->partial)))
- {
- /* We found a match so update our last_match pointer and
- return the string. */
- c->last_match = cur;
- return sbuf_get (cur);
- }
+ {
+ /* We found a match so update our last_match pointer and
+ return the string. */
+ c->last_match = cur;
+ return sbuf_get (cur);
+ }
}
return NULL;
@@ -151,22 +151,22 @@ completions_complete (rp_completions *c, char *partial, int direction)
if (c->virgin)
{
completions_update (c, partial);
-
+
/* Since it's never been completed on and c->last_match points
- to the first element of the list which may be a match. So
- check it. FIXME: This is a bit of a hack. */
+ to the first element of the list which may be a match. So
+ check it. FIXME: This is a bit of a hack. */
if (c->last_match == NULL)
- return NULL;
+ return NULL;
/* c->last_match contains the first match in the forward
- direction. So if we're looking for the previous match, then
- check the previous element from last_match. */
+ direction. So if we're looking for the previous match, then
+ check the previous element from last_match. */
if (direction == COMPLETION_PREVIOUS)
- c->last_match = list_prev_entry (c->last_match, &c->completion_list, node);
+ c->last_match = list_prev_entry (c->last_match, &c->completion_list, node);
/* Now check if last_match is a match for partial. */
if (str_comp (sbuf_get (c->last_match), c->partial, strlen (c->partial)))
- return sbuf_get (c->last_match);
+ return sbuf_get (c->last_match);
}
if (c->last_match == NULL)