replace multi_url with a different keybinding
This commit is contained in:
		
							parent
							
								
									388539ae6c
								
							
						
					
					
						commit
						275bed4ea0
					
				| @ -37,7 +37,8 @@ COMMAND MODE | |||||||
| * ``?``: reverse search | * ``?``: reverse search | ||||||
| * ``u``: forward url search | * ``u``: forward url search | ||||||
| * ``U``: reverse url search | * ``U``: reverse url search | ||||||
| * ``Return``: open the current selection as a url | * ``o``: open the current selection as a url | ||||||
|  | * ``Return``: open the current selection as a url and exit command mode | ||||||
| * ``n``: next search match | * ``n``: next search match | ||||||
| * ``N``: previous search match | * ``N``: previous search match | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										13
									
								
								termite.cc
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								termite.cc
									
									
									
									
									
								
							| @ -45,7 +45,7 @@ struct search_panel_info { | |||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| struct config_info { | struct config_info { | ||||||
|     gboolean dynamic_title, urgent_on_bell, clickable_url, multi_url; |     gboolean dynamic_title, urgent_on_bell, clickable_url; | ||||||
|     int tag; |     int tag; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| @ -356,10 +356,12 @@ gboolean key_press_cb(VteTerminal *vte, GdkEventKey *event, keybind_info *info) | |||||||
|             case GDK_KEY_U: |             case GDK_KEY_U: | ||||||
|                 search(vte, url_regex, true); |                 search(vte, url_regex, true); | ||||||
|                 break; |                 break; | ||||||
|  |             case GDK_KEY_o: | ||||||
|  |                 open_selection(vte); | ||||||
|  |                 break; | ||||||
|             case GDK_KEY_Return: |             case GDK_KEY_Return: | ||||||
|                 open_selection(vte); |                 open_selection(vte); | ||||||
|                 if (!info->config.multi_url) |                 end_selection(vte, &info->select); | ||||||
|                     end_selection(vte, &info->select); |  | ||||||
|                 break; |                 break; | ||||||
|         } |         } | ||||||
|         return TRUE; |         return TRUE; | ||||||
| @ -664,9 +666,6 @@ static void load_config(GtkWindow *window, VteTerminal *vte, config_info *info, | |||||||
|         if (get_config_boolean(config, "options", "urgent_on_bell", &cfgbool)) { |         if (get_config_boolean(config, "options", "urgent_on_bell", &cfgbool)) { | ||||||
|             info->urgent_on_bell = cfgbool; |             info->urgent_on_bell = cfgbool; | ||||||
|         } |         } | ||||||
|         if (get_config_boolean(config, "options", "multi_url", &cfgbool)) { |  | ||||||
|             info->multi_url = cfgbool; |  | ||||||
|         } |  | ||||||
|         if (get_config_boolean(config, "options", "search_wrap", &cfgbool)) { |         if (get_config_boolean(config, "options", "search_wrap", &cfgbool)) { | ||||||
|             vte_terminal_search_set_wrap_around(vte, cfgbool); |             vte_terminal_search_set_wrap_around(vte, cfgbool); | ||||||
|         } |         } | ||||||
| @ -881,7 +880,7 @@ int main(int argc, char **argv) { | |||||||
|     search_panel_info panel = {vte, gtk_entry_new(), |     search_panel_info panel = {vte, gtk_entry_new(), | ||||||
|                                gtk_alignment_new(0, 0, 1, 1), |                                gtk_alignment_new(0, 0, 1, 1), | ||||||
|                                overlay_mode::hidden}; |                                overlay_mode::hidden}; | ||||||
|     keybind_info info = {panel, {vi_mode::insert, 0, 0, 0, 0}, {FALSE, FALSE, FALSE, FALSE, -1}}; |     keybind_info info = {panel, {vi_mode::insert, 0, 0, 0, 0}, {FALSE, FALSE, FALSE, -1}}; | ||||||
| 
 | 
 | ||||||
|     load_config(GTK_WINDOW(window), vte, &info.config, &term, &geometry); |     load_config(GTK_WINDOW(window), vte, &info.config, &term, &geometry); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -15,9 +15,6 @@ search_wrap = true | |||||||
| #icon_name = terminal | #icon_name = terminal | ||||||
| #geometry = 640x480 | #geometry = 640x480 | ||||||
| 
 | 
 | ||||||
| # stay in command mode after opening a url |  | ||||||
| multi_url = false |  | ||||||
| 
 |  | ||||||
| # 0.0: opaque, 1.0: transparent | # 0.0: opaque, 1.0: transparent | ||||||
| transparency = 0.0 | transparency = 0.0 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Daniel Micay
						Daniel Micay