Do not execute autocommands when writing lines to vebugger buffers

For writing lines to vebugger's shell and terminal buffer the active
window is changed for every single line which causes a huge slowdown on
large output. By disabling autocommands, these slowdowns can be reduced.
This commit is contained in:
Ingo Heimbach 2018-05-23 11:49:26 +02:00
parent 833806978e
commit 77925fa4b2
2 changed files with 4 additions and 4 deletions

View File

@ -148,7 +148,7 @@ function! s:f_debugger.addLineToTerminal(pipeName,line) dict
if has_key(self,'terminalBuffer') if has_key(self,'terminalBuffer')
let l:bufwin=bufwinnr(self.terminalBuffer) let l:bufwin=bufwinnr(self.terminalBuffer)
if -1<l:bufwin if -1<l:bufwin
exe l:bufwin.'wincmd w' exe 'noautocmd '.l:bufwin.'wincmd w'
if has_key(self,'pipes') if has_key(self,'pipes')
\&&has_key(self.pipes,a:pipeName) \&&has_key(self.pipes,a:pipeName)
\&&has_key(self.pipes[a:pipeName],'annotation') \&&has_key(self.pipes[a:pipeName],'annotation')
@ -157,7 +157,7 @@ function! s:f_debugger.addLineToTerminal(pipeName,line) dict
call append (line('$'),a:line) call append (line('$'),a:line)
endif endif
normal G normal G
wincmd p noautocmd wincmd p
endif endif
endif endif
endfunction endfunction

View File

@ -142,10 +142,10 @@ function! s:standardFunctions.addLineToShellBuffer(line) dict
if has_key(self,'shellBuffer') if has_key(self,'shellBuffer')
let l:bufwin=bufwinnr(self.shellBuffer) let l:bufwin=bufwinnr(self.shellBuffer)
if -1<l:bufwin if -1<l:bufwin
exe l:bufwin.'wincmd w' exe 'noautocmd '.l:bufwin.'wincmd w'
call append (line('$'),a:line) call append (line('$'),a:line)
normal G normal G
wincmd p noautocmd wincmd p
endif endif
endif endif
endfunction endfunction