added VtrSetCommand function
This commit is contained in:
		
							parent
							
								
									9d91062d79
								
							
						
					
					
						commit
						1f3d65e326
					
				| @ -362,6 +362,20 @@ function! s:FlushCommand() | |||||||
|     endif |     endif | ||||||
| endfunction | endfunction | ||||||
| 
 | 
 | ||||||
|  | function! s:SetCommand(...) | ||||||
|  |     if exists("a:1") && a:1 != "" | ||||||
|  |         let s:user_command = shellescape(a:1) | ||||||
|  |         return | ||||||
|  |     endif | ||||||
|  |     let s:user_command = s:HighlightedPrompt(g:VtrPrompt) | ||||||
|  |     let escaped_empty_string = "''" | ||||||
|  |     if s:user_command == escaped_empty_string | ||||||
|  |         unlet s:user_command | ||||||
|  |         call s:EchoError("command string required") | ||||||
|  |         return | ||||||
|  |     endif | ||||||
|  | endfunction | ||||||
|  | 
 | ||||||
| function! s:SendTmuxCopyModeExit() | function! s:SendTmuxCopyModeExit() | ||||||
|     let l:session = s:TmuxInfo('session_name') |     let l:session = s:TmuxInfo('session_name') | ||||||
|     let l:win = s:TmuxInfo('window_index') |     let l:win = s:TmuxInfo('window_index') | ||||||
| @ -485,6 +499,7 @@ function! s:DefineCommands() | |||||||
|     command! VtrReattachRunner call s:ReattachPane() |     command! VtrReattachRunner call s:ReattachPane() | ||||||
|     command! VtrClearRunner call s:SendClearSequence() |     command! VtrClearRunner call s:SendClearSequence() | ||||||
|     command! VtrFlushCommand call s:FlushCommand() |     command! VtrFlushCommand call s:FlushCommand() | ||||||
|  |     command! -nargs=? VtrSetCommand call s:SetCommand(<f-args>) | ||||||
|     command! VtrSendCtrlD call s:SendCtrlD() |     command! VtrSendCtrlD call s:SendCtrlD() | ||||||
|     command! VtrSendCtrlC call s:SendCtrlC() |     command! VtrSendCtrlC call s:SendCtrlC() | ||||||
|     command! -bang -nargs=? -bar VtrAttachToPane call s:AttachToPane(<f-args>) |     command! -bang -nargs=? -bar VtrAttachToPane call s:AttachToPane(<f-args>) | ||||||
| @ -530,6 +545,6 @@ endfunction | |||||||
| 
 | 
 | ||||||
| call s:InitializeVariables() | call s:InitializeVariables() | ||||||
| call s:DefineCommands() | call s:DefineCommands() | ||||||
| call s:DefineKeymaps() | " call s:DefineKeymaps() | ||||||
| 
 | 
 | ||||||
| " vim: set fdm=marker | " vim: set fdm=marker | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user