mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Allow selection in vi mode.
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| /* $Id: mode-key.c,v 1.9 2009-02-13 21:39:45 nicm Exp $ */ | ||||
| /* $Id: mode-key.c,v 1.10 2009-02-21 17:46:13 nicm Exp $ */ | ||||
|  | ||||
| /* | ||||
|  * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> | ||||
| @@ -94,7 +94,7 @@ mode_key_lookup_vi(struct mode_key_data *mdata, int key) | ||||
| 		} | ||||
| 		break; | ||||
| 	case '\r': | ||||
| 		if (mdata->flags & MODEKEY_CANEDIT) | ||||
| 		if (mdata->flags & (MODEKEY_CANEDIT|MODEKEY_CHOOSEMODE)) | ||||
| 			return (MODEKEYCMD_CHOOSE); | ||||
| 		return (MODEKEYCMD_COPYSELECTION); | ||||
| 	case '0': | ||||
|   | ||||
							
								
								
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tmux.h
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | ||||
| /* $Id: tmux.h,v 1.273 2009-02-13 21:39:45 nicm Exp $ */ | ||||
| /* $Id: tmux.h,v 1.274 2009-02-21 17:46:13 nicm Exp $ */ | ||||
|  | ||||
| /* | ||||
|  * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> | ||||
| @@ -428,6 +428,7 @@ struct mode_key_data { | ||||
| 	int			 flags; | ||||
| #define MODEKEY_EDITMODE 0x1 | ||||
| #define MODEKEY_CANEDIT 0x2 | ||||
| #define MODEKEY_CHOOSEMODE 0x4 | ||||
| }; | ||||
|  | ||||
| #define MODEKEY_EMACS 0 | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| /* $Id: window-choose.c,v 1.11 2009-02-13 21:39:45 nicm Exp $ */ | ||||
| /* $Id: window-choose.c,v 1.12 2009-02-21 17:46:13 nicm Exp $ */ | ||||
|  | ||||
| /* | ||||
|  * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> | ||||
| @@ -119,7 +119,8 @@ window_choose_init(struct window_pane *wp) | ||||
| 	s->mode |= MODE_MOUSE; | ||||
|  | ||||
| 	mode_key_init(&data->mdata, | ||||
| 	    options_get_number(&wp->window->options, "mode-keys"), 0); | ||||
| 	    options_get_number(&wp->window->options, "mode-keys"), | ||||
| 	    MODEKEY_CHOOSEMODE); | ||||
| 	 | ||||
| 	return (s); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Nicholas Marriott
					Nicholas Marriott