rem: case 'B': 
add: case 'B':	/* B toggles "block" mode */ 
context: function quote_mode(){	var i;	var select_mode=false;	var select_start=0;	quote_height=parseInt(lines_on_screen/2)-1;	/* Rounds down */	var curr_ypos=ypos-topline+edit_top;	/* Decide if quote window should go at top or at bottom */	if(curr_ypos>edit_top+quote_height)		quote_ontop=true;	else		quote_ontop=false;	if(quote_ontop) {		quote_sep_pos=edit_top+quote_height;		quote_window_displayed=edit_top;		quote_top=edit_top;		quote_bottom=quote_sep_pos-1;	}	else {		quote_sep_pos=edit_bottom-quote_height;		quote_window_displayed=quote_sep_pos;		quote_top=quote_sep_pos+1;		quote_bottom=edit_bottom;	}	for(i=0;i<quote_line.length;i++)		quote_line[i].selected=false;	draw_quote_window();	while(1) {		set_cursor();		key=console.inkey(0,10000);		if(key=='')			continue;		switch(key) {			case 'a':			case 'A':			case '\x01':	/* A and CTRL-A -- Select all */				for(i=0;i<quote_line.length;i++)					quote_line[i].selected=true;				for(i=0; i< quote_height; i++)					draw_quote_selection(quote_topline+i);				break;			case 'n':			case 'N':			case '\x0e':	/* Unselect all */				for(i=0;i<quote_line.length;i++)					quote_line[i].selected=false;				for(i=0; i< quote_height; i++)					draw_quote_selection(quote_topline+i);				break;			case '\x12':	/* CTRL-R (Quick Redraw in SyncEdit) */				redraw_screen();				break;			case KEY_HOME:				quote_ypos=0;				quote_topline=0;				draw_quote_window();				break;			case KEY_END:				quote_ypos=quote_line.length-1;				quote_topline=quote_line.length-quote_height;				if(quote_topline<0)					quote_topline=0;				draw_quote_window();				break;			case KEY_DOWN:				quote_ypos++;				if(quote_ypos>=quote_line.length) {					quote_ypos=quote_line.length-1;					console.beep();					break;				}				if(select_mode) {					if(quote_ypos > select_start) {						quote_line[quote_ypos].selected=true;					}					else {						quote_line[quote_ypos-1].selected=false;					}				}				if(quote_ypos>=quote_topline+quote_height) {					quote_topline++;					draw_quote_window();					break;				}				draw_quote_selection(quote_ypos-1);				draw_quote_selection(quote_ypos);				break;			case KEY_UP:				quote_ypos--;				if(quote_ypos<0) {					quote_ypos=0;					console.beep();					break;				}				if(select_mode) {					if(quote_ypos < select_start) {						quote_line[quote_ypos].selected=true;					}					else {						quote_line[quote_ypos+1].selected=false;					}				}				if(quote_ypos<quote_topline) {					quote_topline=quote_ypos;					draw_quote_window();					break;				}				draw_quote_selection(quote_ypos+1);				draw_quote_selection(quote_ypos);				break;			case ' ':	/* Toggle selection of current line */				quote_line[quote_ypos].selected=!quote_line[quote_ypos].selected;				draw_quote_selection(quote_ypos);				break;			case 'B':			case 'b':			case '\x02':	/* B or CTRL-B toggles "block" mode */				select_mode=!select_mode;				if(select_mode) {					select_start=quote_ypos;					quote_line[quote_ypos].selected=true;					draw_quote_selection(quote_ypos);				}				break;			case '\x0d':	/* CR */				for(i=0; i<quote_line.length-1; i++) {					if(quote_line[i].selected) {						line.splice(ypos,0,quote_line[i]);						ypos++;					}				}				quote_window_displayed=0;				redraw_screen();				return(false);			case '\x1f':			case '\x11':	/* CTRL-Q (XOff) (Quick Abort in SyncEdit) */				return(true);			case '\x18':    /* CTRL-X (PgDn in SyncEdit) */				quote_ypos+=quote_height-1;				quote_topline+=quote_height-1;				if(quote_ypos>=quote_line.length)					quote_ypos=quote_line.length-1;				if(quote_topline+quote_height>quote_line.length)					quote_topline=quote_line.length-quote_height;				if(quote_topline<0)					quote_topline=0;				draw_quote_window();				break;			case '\x19':    /* CTRL-Y (Delete Line in SyncEdit) */				quote_ypos-=quote_height-1;				quote_topline-=quote_height-1;				if(quote_ypos<0)					quote_ypos=0;				if(quote_topline<0)					quote_topline=0;				draw_quote_window();				break;			case '\x1a':	/* CTRL-Z (EOF) (PgUp in SyncEdit)  */				quote_ypos-=quote_height-1;				quote_topline-=quote_height-1;				if(quote_ypos<0)					quote_ypos=0;				if(quote_topline<0)					quote_topline=0;				draw_quote_window();				break;		}	}}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/0062d10b2eec73d232f4d5b0876f781f530f0c3e/fseditor.js/clean/fseditor.js