comparison mcabber/src/screen.c @ 827:04da822bc47c

Expand tabs in verbatim multi-line mode
author Mikael Berthe <mikael@lilotux.net>
date Sun, 30 Apr 2006 14:03:46 +0200
parents 3a3c7a017904
children 319fc55b9a2b
comparison
equal deleted inserted replaced
826:3a3c7a017904 827:04da822bc47c
2186 scr_cancel_current_completion(); 2186 scr_cancel_current_completion();
2187 scr_end_current_completion(); 2187 scr_end_current_completion();
2188 check_offset(-1); 2188 check_offset(-1);
2189 break; 2189 break;
2190 case 9: // Tab 2190 case 9: // Tab
2191 scr_handle_tab(); 2191 if (scr_get_multimode() != 2) {
2192 // Not in verbatim multi-line mode
2193 scr_handle_tab();
2194 } else {
2195 // Verbatim multi-line mode: expand tab
2196 char tabstr[9];
2197 int i, n;
2198 n = 8 - (ptr_inputline - inputLine) % 8;
2199 for (i = 0; i < n; i++)
2200 tabstr[i] = ' ';
2201 tabstr[i] = '\0';
2202 scr_insert_text(tabstr);
2203 }
2192 check_offset(0); 2204 check_offset(0);
2193 break; 2205 break;
2194 case 13: // Enter 2206 case 13: // Enter
2195 case 15: // Ctrl-o ("accept-line-and-down-history") 2207 case 15: // Ctrl-o ("accept-line-and-down-history")
2196 scr_CheckAutoAway(TRUE); 2208 scr_CheckAutoAway(TRUE);