try this, and if you want to see it without the full input line redraws, also try it with the //'d line at input.c:399 uncommented again to have the redraw fix (but this breaks when you type more than the width of the screen.) Index: source/input.c =================================================================== RCS file: /home/cvs/ircii/source/input.c,v retrieving revision 1.55 diff -p -r1.55 input.c *** source/input.c 30 Dec 2013 16:42:38 -0000 1.55 --- source/input.c 30 Jan 2014 09:40:32 -0000 *************** input_do_calculate_width(unsigned unival *** 96,102 **** static void input_do_set_cursor_pos(unsigned pos) { - cursor_to_input(); current_screen->inputdata.buffer.pos = pos; update_input(UPDATE_JUST_CURSOR); } --- 96,101 ---- *************** input_do_insert_raw(u_char* source) *** 116,122 **** if (pos + inslen > max) { ! inslen = max-pos; } /* Move the tail out of way */ --- 115,121 ---- if (pos + inslen > max) { ! inslen = max - pos; } /* Move the tail out of way */ *************** input_do_insert_raw(u_char* source) *** 128,141 **** source, inslen); /* Ensure the buffer is terminated */ ! buf[max-1] = '\0'; pos += inslen; if (pos > max) pos = max; /* Update the screen from the old cursor position */ - cursor_to_input(); update_input(UPDATE_FROM_CURSOR); /* Then place the cursor correctly */ input_do_set_cursor_pos(pos); --- 127,139 ---- source, inslen); /* Ensure the buffer is terminated */ ! buf[max - 1] = '\0'; pos += inslen; if (pos > max) pos = max; /* Update the screen from the old cursor position */ update_input(UPDATE_FROM_CURSOR); /* Then place the cursor correctly */ input_do_set_cursor_pos(pos); *************** input_do_delete_raw(int n, int do_save_c *** 148,154 **** unsigned pos = current_screen->inputdata.buffer.pos; unsigned max = sizeof(current_screen->inputdata.buffer.buf); - cursor_to_input(); /* If n>0, deletes from front * if n<0, deletes from back & moves cursor */ --- 146,151 ---- *************** update_input(update) *** 399,405 **** if (update == UPDATE_FROM_CURSOR) { ! old_cursor_pos = inputdata->buffer.pos; } if (update == UPDATE_JUST_CURSOR || update == UPDATE_ALL) { --- 396,402 ---- if (update == UPDATE_FROM_CURSOR) { ! //old_cursor_pos = inputdata->buffer.pos; } if (update == UPDATE_JUST_CURSOR || update == UPDATE_ALL) { *************** update_input(update) *** 407,413 **** unsigned pos = inputdata->buffer.pos; unsigned limit = inputdata->buffer.minpos; unsigned column, ptr; - unsigned window; /* Recalculate pos_column */ --- 404,409 ---- *************** update_input(update) *** 424,430 **** inputdata->pos_column = column; window = column - (column % inputdata->zone); ! /* Recalculate left_ptr */ for (column = ptr = 0; column < window; ) { --- 420,426 ---- inputdata->pos_column = column; window = column - (column % inputdata->zone); ! /* Recalculate left_ptr */ for (column = ptr = 0; column < window; ) { *************** update_input(update) *** 488,493 **** --- 484,491 ---- } } VisBuf[optr] = '\0'; + if (old_cursor_pos > inputdata->cursor_y) + old_cursor_pos = 0; term_move_cursor(old_cursor_pos, inputdata->cursor_y); written = output_line(VisBuf + old_cursor_pos, 0); if (term_clear_to_eol() && written < current_screen->co) Index: source/screen.c =================================================================== RCS file: /home/cvs/ircii/source/screen.c,v retrieving revision 1.165 diff -p -r1.165 screen.c *** source/screen.c 12 Jan 2014 07:05:28 -0000 1.165 --- source/screen.c 30 Jan 2014 09:40:33 -0000 *************** scrollback_backwards_lines(int ScrollDis *** 2689,2695 **** window->scrolled_lines, window); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); window->update |= UPDATE_STATUS; update_window_status(window, 0); } --- 2689,2695 ---- window->scrolled_lines, window); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); // XXXMRG why this? window->update |= UPDATE_STATUS; update_window_status(window, 0); } *************** scrollback_forwards_lines(int ScrollDist *** 2736,2742 **** window->scrolled_lines - window->display_size + ScrollDist, window); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); if (!window->scrolled_lines) { --- 2736,2742 ---- window->scrolled_lines - window->display_size + ScrollDist, window); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); // XXXMRG why this? if (!window->scrolled_lines) { *************** scrollback_end(u_int key, u_char *ptr) *** 2790,2796 **** window->scrolled_lines = window->new_scrolled_lines = 0; redraw_window(window, 1, 1); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); if (window->hold_mode) hold_mode(window, ON, 1); else --- 2790,2796 ---- window->scrolled_lines = window->new_scrolled_lines = 0; redraw_window(window, 1, 1); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); // XXXMRG why this? if (window->hold_mode) hold_mode(window, ON, 1); else *************** scrollback_start(u_int key, u_char *ptr) *** 2829,2835 **** display_lastlog_lines(num_lines - window->display_size, window->scrolled_lines, window); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); window->new_scrolled_lines = 0; if (window->hold_mode) hold_mode(window, ON, 1); --- 2829,2835 ---- display_lastlog_lines(num_lines - window->display_size, window->scrolled_lines, window); cursor_not_in_display(); ! update_input(UPDATE_JUST_CURSOR); // XXXMRG why this? window->new_scrolled_lines = 0; if (window->hold_mode) hold_mode(window, ON, 1); Index: source/window.c =================================================================== RCS file: /home/cvs/ircii/source/window.c,v retrieving revision 1.159 diff -p -r1.159 window.c *** source/window.c 30 Dec 2013 16:42:39 -0000 1.159 --- source/window.c 30 Jan 2014 09:40:33 -0000 *************** redraw_all_status(void) *** 1493,1499 **** new_free(&tmp->status_line[1]); make_status(tmp); } ! update_input(UPDATE_JUST_CURSOR); term_flush(); } --- 1493,1499 ---- new_free(&tmp->status_line[1]); make_status(tmp); } ! update_input(UPDATE_JUST_CURSOR); // XXXMRG why this? term_flush(); } *************** update_all_status(void) *** 1519,1525 **** if (window->visible) make_status(window); } ! update_input(UPDATE_JUST_CURSOR); term_flush(); } --- 1519,1525 ---- if (window->visible) make_status(window); } ! update_input(UPDATE_JUST_CURSOR); // XXXMRG why this? term_flush(); }