--- a/mcabber/src/screen.c Fri Jul 01 23:50:08 2005 +0100
+++ b/mcabber/src/screen.c Sat Jul 02 12:05:11 2005 +0100
@@ -1466,15 +1466,28 @@
check_offset(0);
break;
case '\n': // Enter
+ case 15: // Ctrl-o ("accept-line-and-down-history")
if (process_line(inputLine))
return 255;
// Add line to history
scr_cmdhisto_addline(inputLine);
- cmdhisto_cur = NULL;
// Reset the line
ptr_inputline = inputLine;
*ptr_inputline = 0;
inputline_offset = 0;
+
+ if (key == '\n') // Enter
+ {
+ // Reset history line pointer
+ cmdhisto_cur = NULL;
+ } else { // down-history
+ // Use next history line instead of a blank line
+ const char *l = scr_cmdhisto_next("", 0);
+ if (l)
+ strcpy(inputLine, l);
+ // Reset backup history line
+ cmdhisto_backup[0] = 0;
+ }
break;
case KEY_UP:
{