mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Improve #? conditional expression in formats:
1) add support for else if, so
   #{?cond1,value1,#{?cond2,value2,else-value}} can be changed to
   #{?cond1,value1,cond2,value2,else-value};
2) add default empty string if there's no else value, so
   #{?cond1,value1,} can be changed to #{?cond1,value1}.
From David Mandelberg in GitHub issue 4451.
			
			
This commit is contained in:
		@@ -43,12 +43,8 @@ static void		 window_client_key(struct window_mode_entry *,
 | 
			
		||||
#define WINDOW_CLIENT_DEFAULT_KEY_FORMAT \
 | 
			
		||||
	"#{?#{e|<:#{line},10}," \
 | 
			
		||||
		"#{line}" \
 | 
			
		||||
	"," \
 | 
			
		||||
		"#{?#{e|<:#{line},36},"	\
 | 
			
		||||
	        	"M-#{a:#{e|+:97,#{e|-:#{line},10}}}" \
 | 
			
		||||
		"," \
 | 
			
		||||
	        	"" \
 | 
			
		||||
		"}" \
 | 
			
		||||
	",#{e|<:#{line},36},"	\
 | 
			
		||||
		"M-#{a:#{e|+:97,#{e|-:#{line},10}}}" \
 | 
			
		||||
	"}"
 | 
			
		||||
 | 
			
		||||
static const struct menu_item window_client_menu_items[] = {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user