--- a/mcabber/doc/mcabber.1 Fri Jul 01 23:50:08 2005 +0100
+++ b/mcabber/doc/mcabber.1 Sat Jul 02 12:05:11 2005 +0100
@@ -98,6 +98,8 @@
Ctrl\-t Transpose chars
+Ctrl\-o Accept line and put the next history line in the input line (accept\-line\-and\-down\-history)
+
Ctrl\-q Jump to the next unread message
--- a/mcabber/doc/mcabber.1.html Fri Jul 01 23:50:08 2005 +0100
+++ b/mcabber/doc/mcabber.1.html Sat Jul 02 12:05:11 2005 +0100
@@ -172,6 +172,14 @@
</tr>
<tr valign="top">
<td>
+Ctrl-o
+</td>
+<td>
+Accept line and put the next history line in the input line (accept-line-and-down-history)
+</td>
+</tr>
+<tr valign="top">
+<td>
Ctrl-q
</td>
<td>
@@ -436,7 +444,7 @@
<div id="footer">
<p>
Version 0.6.2<br />
-Last updated 02-Jul-2005 00:36:19 CEST
+Last updated 02-Jul-2005 13:00:02 CEST
</p>
</div>
</div>
--- a/mcabber/doc/mcabber.1.txt Fri Jul 01 23:50:08 2005 +0100
+++ b/mcabber/doc/mcabber.1.txt Sat Jul 02 12:05:11 2005 +0100
@@ -71,6 +71,7 @@
Ctrl-k:: Delete from the cursor to the end of line
Ctrl-w:: Backward kill word
Ctrl-t:: Transpose chars
+Ctrl-o:: Accept line and put the next history line in the input line (accept-line-and-down-history)
Ctrl-q:: Jump to the next unread message
COMMANDS
--- 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:
{