comparison mcabber/src/screen.c @ 196:58eb8ad9ef74

[/trunk] Changeset 208 by mikael * Minor changes: remove useless doupdate(), add comments, update TODO * Trap ctrl-q key (for future scr_jump_next_new_message() function...)
author mikael
date Sat, 07 May 2005 06:34:47 +0000
parents cdaa53d5ef70
children c289e3c39c48
comparison
equal deleted inserted replaced
195:cdaa53d5ef70 196:58eb8ad9ef74
593 593
594 // Update offset if necessary 594 // Update offset if necessary
595 i = g_list_position(buddylist, current_buddy); 595 i = g_list_position(buddylist, current_buddy);
596 if (i == -1) { // This is bad 596 if (i == -1) { // This is bad
597 scr_LogPrint("Doh! Can't find current selected buddy!!"); 597 scr_LogPrint("Doh! Can't find current selected buddy!!");
598 update_panels();
599 doupdate();
600 return; 598 return;
601 } else if (i < offset) { 599 } else if (i < offset) {
602 offset = i; 600 offset = i;
603 } else if (i+1 > offset + maxy) { 601 } else if (i+1 > offset + maxy) {
604 offset = i + 1 - maxy; 602 offset = i + 1 - maxy;
1086 // Transpose the two previous characters 1084 // Transpose the two previous characters
1087 swp = *(ptr_inputline-2); 1085 swp = *(ptr_inputline-2);
1088 *(ptr_inputline-2) = *(ptr_inputline-1); 1086 *(ptr_inputline-2) = *(ptr_inputline-1);
1089 *(ptr_inputline-1) = swp; 1087 *(ptr_inputline-1) = swp;
1090 } else { 1088 } else {
1089 // Swap the two characters before the cursor and move right.
1091 swp = *(ptr_inputline-1); 1090 swp = *(ptr_inputline-1);
1092 *(ptr_inputline-1) = *ptr_inputline; 1091 *(ptr_inputline-1) = *ptr_inputline;
1093 *ptr_inputline++ = swp; 1092 *ptr_inputline++ = swp;
1094 check_offset(1); 1093 check_offset(1);
1095 } 1094 }
1380 scr_ScrollUp(); 1379 scr_ScrollUp();
1381 break; 1380 break;
1382 case 14: // Ctrl-n 1381 case 14: // Ctrl-n
1383 scr_ScrollDown(); 1382 scr_ScrollDown();
1384 break; 1383 break;
1384 case 17: // Ctrl-q
1385 // scr_jump_next_new_message();
1386 break;
1385 case 20: // Ctrl-t 1387 case 20: // Ctrl-t
1386 readline_transpose_chars(); 1388 readline_transpose_chars();
1387 break; 1389 break;
1388 case 23: // Ctrl-w 1390 case 23: // Ctrl-w
1389 readline_backward_kill_word(); 1391 readline_backward_kill_word();