changed Backspace/C-w behavior (now it only removes a single character)
This commit is contained in:
		
							parent
							
								
									29ca954fad
								
							
						
					
					
						commit
						60c7046126
					
				@ -82,7 +82,7 @@ Quit without selecting an item. Returns
 | 
				
			|||||||
on termination.
 | 
					on termination.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Backspace (Control\-h)
 | 
					.B Backspace (Control\-h)
 | 
				
			||||||
Remove enough characters from the input field to change its filtering effect.
 | 
					Remove a character from the input field.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Control\-u
 | 
					.B Control\-u
 | 
				
			||||||
Remove all characters from the input field.
 | 
					Remove all characters from the input field.
 | 
				
			||||||
 | 
				
			|||||||
@ -289,12 +289,8 @@ kpress(XKeyEvent * e) {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case XK_BackSpace:
 | 
						case XK_BackSpace:
 | 
				
			||||||
		if((i = len)) {
 | 
							if(len) {
 | 
				
			||||||
			prev_nitem = nitem;
 | 
								text[--len] = 0;
 | 
				
			||||||
			do {
 | 
					 | 
				
			||||||
				text[--i] = 0;
 | 
					 | 
				
			||||||
				match(text);
 | 
					 | 
				
			||||||
			} while(i && nitem && prev_nitem == nitem);
 | 
					 | 
				
			||||||
			match(text);
 | 
								match(text);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user