Before this was just being set to something similar to the default
height. Though this code is harder to read, it fixes the following:
Close the right list (the location list or the quickfix window). This
is fixed for the e and q commands too.
If someone specifies a height (e.g. let g:ag_qhandler="copen 50")
then gv will be less jarring because when the quickfix window is
re-opened it'll be 50 lines again.
The gv, e, and q mappings depended on a local variable that won't
be available when the mapping was used, so |:execute| was used for those
mappings to evaluate that variable when the mappings are made.
Fixes #11
Thanks to @sigmavirus24 for helping out with this one :)
Before this was just being set to something similar to the default height. Though this code is harder to read, it fixes the following:
e
andq
commands too.let g:ag_qhandler="copen 50"
) thengv
will be less jarring because when the quickfix window is re-opened it'll be 50 lines again.The
gv
,e
, andq
mappings depended on a local variable that won't be available when the mapping was used, so |:execute| was used for those mappings to evaluate that variable when the mappings are made.Fixes #11
Thanks to @sigmavirus24 for helping out with this one :)