Skip to content

Commit

Permalink
Backport terminal leak fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brock8503 committed Oct 21, 2020
1 parent 36e40f9 commit 06942e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload/ack.vim
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,21 @@ endfunction "}}}
function! s:SearchWithGrep(grepcmd, grepprg, grepargs, grepformat) "{{{
let l:grepprg_bak = &l:grepprg
let l:grepformat_bak = &grepformat
let l:t_ti_bak=&t_ti
let l:t_te_bak=&t_te

try
let &l:grepprg = a:grepprg
let &grepformat = a:grepformat
set t_ti=
set t_te=

silent execute a:grepcmd a:grepargs
finally
let &l:grepprg = l:grepprg_bak
let &grepformat = l:grepformat_bak
let &t_ti=l:t_ti_bak
let &t_te=l:t_te_bak
endtry
endfunction "}}}

Expand Down

2 comments on commit 06942e4

@zatnas
Copy link

@zatnas zatnas commented on 06942e4 Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it work?

@brock8503
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep it did what I needed and let me replace ag.vim in my config.

Please sign in to comment.