mirror of
				https://github.com/tmux-plugins/tmux-sensible.git
				synced 2025-11-04 00:16:03 +00:00 
			
		
		
		
	Bugfix for 'prefix + R' key binding
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### master
 | 
					### master
 | 
				
			||||||
 | 
					- bugfix for `prefix + R` key binding
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### v2.2.0, 2015-02-10
 | 
					### v2.2.0, 2015-02-10
 | 
				
			||||||
- bugfix in `key_binding_not_set`: the regex is now properly detecting key
 | 
					- bugfix in `key_binding_not_set`: the regex is now properly detecting key
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,7 +41,7 @@ server_option_value_not_changed() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
key_binding_not_set() {
 | 
					key_binding_not_set() {
 | 
				
			||||||
	local key="$1"
 | 
						local key="$1"
 | 
				
			||||||
	if $(tmux list-keys | grep -q "bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?${key}"); then
 | 
						if $(tmux list-keys | grep -q "bind-key[[:space:]]\+\(-r[[:space:]]\+\)\?${key}[[:space:]]"); then
 | 
				
			||||||
		return 1
 | 
							return 1
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		return 0
 | 
							return 0
 | 
				
			||||||
@@ -160,7 +160,7 @@ main() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	# source `.tmux.conf` file - as suggested in `man tmux`
 | 
						# source `.tmux.conf` file - as suggested in `man tmux`
 | 
				
			||||||
	if key_binding_not_set "R"; then
 | 
						if key_binding_not_set "R"; then
 | 
				
			||||||
		tmux bind-key R run-shell -b ' \
 | 
							tmux bind-key R run-shell ' \
 | 
				
			||||||
			tmux source-file ~/.tmux.conf > /dev/null; \
 | 
								tmux source-file ~/.tmux.conf > /dev/null; \
 | 
				
			||||||
			tmux display-message "Sourced .tmux.conf!"'
 | 
								tmux display-message "Sourced .tmux.conf!"'
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user