summaryrefslogtreecommitdiff
path: root/src/editor.c
diff options
context:
space:
mode:
authorBernhard R. Link <brlink@debian.org>2008-06-10 15:40:50 +0200
committerShawn <sabetts@juicebox.(none)>2008-10-22 14:23:55 -0700
commit3737db1e6072c557748ba0ffcdca1e810b15009f (patch)
tree086728bed62b01cf799732dc43a75d78de13dbc7 /src/editor.c
parentd11f0735321bc725441fbc1dec04e363d07c987a (diff)
downloadratpoison-3737db1e6072c557748ba0ffcdca1e810b15009f.zip
move all HAVE_HISTORY into history.c
Diffstat (limited to 'src/editor.c')
-rw-r--r--src/editor.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/editor.c b/src/editor.c
index b2a72f9..0623186 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -56,9 +56,7 @@ static edit_status editor_complete_next (rp_input_line *line);
static edit_status editor_insert (rp_input_line *line, char *keysym_buf);
-#ifdef HAVE_HISTORY
static char *saved_command = NULL;
-#endif
typedef struct edit_binding edit_binding;
@@ -358,7 +356,6 @@ editor_backward_kill_line (rp_input_line *line)
static edit_status
editor_history_previous (rp_input_line *line)
{
-#ifdef HAVE_HISTORY
const char *entry = history_previous (line->history_id);
if (entry)
@@ -384,18 +381,11 @@ editor_history_previous (rp_input_line *line)
}
return EDIT_INSERT;
-
-#else /* HAVE_HISTORY */
-
- return EDIT_NO_OP;
-
-#endif /* HAVE_HISTORY */
}
static edit_status
editor_history_next (rp_input_line *line)
{
-#ifdef HAVE_HISTORY
const char *entry = history_next (line->history_id);
if (entry)
@@ -422,10 +412,6 @@ editor_history_next (rp_input_line *line)
line->position = line->length;
return EDIT_INSERT;
-
-#else /* HAVE_HISTORY */
- return EDIT_NO_OP;
-#endif /* HAVE_HISTORY */
}
static edit_status
@@ -467,13 +453,10 @@ editor_insert (rp_input_line *line, char *keysym_buf)
static edit_status
editor_enter (rp_input_line *line)
{
-#ifdef HAVE_HISTORY
int result;
char *expansion;
-#endif
line->buffer[line->length] = '\0';
-#ifdef HAVE_HISTORY
result = history_expand_line (line->history_id, line->buffer, &expansion);
PRINT_DEBUG (("History Expansion - result: %d\n", result));
@@ -491,7 +474,6 @@ editor_enter (rp_input_line *line)
free (line->buffer);
line->buffer = expansion;
}
-#endif /* HAVE_HISTORY */
return EDIT_DONE;
}