about summary refs log tree commit diff stats
path: root/src/tools
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-07-13 22:59:42 +0100
committerJames Booth <boothj5@gmail.com>2013-07-13 23:02:36 +0100
commit1d05a7047314fa3c669358114dc6ce36bbc08386 (patch)
tree3f50dddec96300fcf7e0d267a40956ba2616be02 /src/tools
parent907beb55f6dba952b6b07579c919fad251b7a0c0 (diff)
downloadprofani-tty-1d05a7047314fa3c669358114dc6ce36bbc08386.tar.gz
Down arrow adds current line to history and shows empty line
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/history.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/history.c b/src/tools/history.c
index 5ac41969..b80a9555 100644
--- a/src/tools/history.c
+++ b/src/tools/history.c
@@ -146,6 +146,10 @@ history_next(History history, char *item)
         return NULL;
     }
 
+    if (g_list_next(history->session.sess_curr) == NULL) {
+        return NULL;
+    }
+
     char *copied = "";
     if (item != NULL) {
         copied = strdup(item);