Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Location List height grows when switching to different panes #1489

Closed
gblock0 opened this issue Jul 25, 2015 · 8 comments
Closed

Location List height grows when switching to different panes #1489

gblock0 opened this issue Jul 25, 2015 · 8 comments

Comments

@gblock0
Copy link

gblock0 commented Jul 25, 2015

When I move back and forth between two or more panes (some with errors detected by Syntastic and some without any) the top Location List height grows to become almost the full height of the window.

I've looked online and haven't found any way to resolve this.

Here are my Syntastic settings:

let g:syntastic_javascript_checkers = ['jshint', 'jscs']
let g:syntastic_html_checkers = ['']

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_loc_list_height=5
nnoremap <Leader>{ :lprev<CR>
nnoremap <Leader>} :lnext<CR>

VIM Version:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 16 2015 10:16:41)
MacOS X (unix) version
Included patches: 1-712
Compiled by Homebrew
Huge version with MacVim GUI.

Syntastic Version:
Syntastic version: 3.6.0-128 (Vim 704, Darwin)
Info for filetype: javascript
Global mode: active
Filetype javascript is active
The current file will be checked automatically
syntastic: error: checker output:
zsh:1: command not found: jsxhint
syntastic: error: checker javascript/jsxhint: can't parse version string (abnormal termination?)
Available checkers: jscs jshint
Currently enabled checkers: jshint jscs

I'm not sure why Syntastic is looking for jsxhint when I haven't specified it in any of my files. Would this error cause the location list height to grow?

@lcd047
Copy link
Collaborator

lcd047 commented Jul 26, 2015

There is no code in syntastic to resize windows. There is exactly one place in the code where a window height is referenced, and that's the line that opens the error window:

execute 'lopen ' . syntastic#util#var('loc_list_height')

If you're seeing a window changing size this is either the doing of some other plugin, or you have stacked so many windows atop each other that winheight, winminheight (and whatever other traps Vim has set there for you) are kicking in. Either way, it has nothing to do with syntastic. shrug

On a side note: if you want to disable checks for html you could either set html as a passive filetype, or set g:syntastic_html_checkers to an empty list:

let g:syntastic_html_checkers = []

@gblock0
Copy link
Author

gblock0 commented Jul 27, 2015

Ok. Thanks for checking.

@lcd047 lcd047 closed this as completed Jul 28, 2015
@expipiplus1
Copy link

@gblock0 did you ever find a solution to this?

@gblock0
Copy link
Author

gblock0 commented Oct 17, 2015

@expipiplus1 No :( I just don't show the location list by default now

@lcd047
Copy link
Collaborator

lcd047 commented Oct 17, 2015

Does the problem go away if you disable all other plugins? If it does, you can try disabling plugins in turn (something aking to binary search might help here), until you find the culprit. If it doesn't, the problem is likely to be related to a setting in your vimrc. Here again you might try to comment things out in turn (and some kind of binary search might help), but finding the problem is likely to be more complicated.

@expipiplus1
Copy link

@lcd047 As far as I can tell, the culprit is autocmd FileType qf wincmd J which makes the loclist always be at the bottom of the screen, so when a new one is opened, it bumps up the old one.

I've been tinkering with something like this, but my vimscript-fu is very poor. Note, this doesn't work because it enters a loop of always calling lopen, because when it's finished opening the new window vim enters the parent buffer, and calls the autocmd again!

function! OpenLocListPerhaps()                       
  let l:l = len(getloclist(0))
  if (l > 0 && 0)
    let l:s = min([l, 10])
    execute "lopen " . s
  endif
endfunction                                             

autocmd BufUnload,BufWinLeave,BufLeave *.hs,*.lhs,*.c,*.cpp lclose
autocmd BufEnter *.hs,*.lhs,*.c,*.cpp call OpenLocListPerhaps()

@lcd047
Copy link
Collaborator

lcd047 commented Oct 17, 2015

Syntastic doesn't set autocmd FileType qf. shrug

@expipiplus1
Copy link

oh sorry, that was something from my vimrc

matt1003 added a commit to matt1003/quickr-preview.vim that referenced this issue May 16, 2018
This seems to be a common bug:

mileszs/ack.vim#150
vim-syntastic/syntastic#1489

For me, the issue occurs when I have NERDTree open; each time I close
the preview window, the qf/loc window grows to fill the space that was
previously filled by the preview window. This will continue to occur on
each preview window close, until the qf/loc window takes up the entire
screen.

The fix introduced by this patch is to force the qf/loc window back to
its original size each time the preview window closed. This fix is a bit
hacky, but it seems to work well.
matt1003 added a commit to matt1003/quickr-preview.vim that referenced this issue May 16, 2018
This seems to be a common bug:

mileszs/ack.vim#150
vim-syntastic/syntastic#1489

For me, the issue occurs when I have NERDTree open; each time I close
the preview window, the qf/loc window grows to fill the space that was
previously filled by the preview window. This will continue to occur on
each preview window close, until the qf/loc window takes up the entire
screen.

The fix introduced by this patch is to force the qf/loc window back to
its original size each time the preview window closed. This fix is a bit
hacky, but it seems to work well.
matt1003 added a commit to matt1003/quickr-preview.vim that referenced this issue May 17, 2018
This seems to be a common bug:

mileszs/ack.vim#150
vim-syntastic/syntastic#1489

For me, the issue occurs when I have NERDTree open; each time I close
the preview window, the qf/loc window grows to fill the space that was
previously filled by the preview window. This will continue to occur on
each preview window close, until the qf/loc window takes up the entire
screen.

The fix introduced by this patch is to force the qf/loc window back to
its original size each time the preview window closed. This fix is a bit
hacky, but it seems to work well.
matt1003 added a commit to matt1003/quickr-preview.vim that referenced this issue May 22, 2018
This seems to be a common bug:

mileszs/ack.vim#150
vim-syntastic/syntastic#1489

For me, the issue occurs when I have NERDTree open; each time I close
the preview window, the qf/loc window grows to fill the space that was
previously filled by the preview window. This will continue to occur on
each preview window close, until the qf/loc window takes up the entire
screen.

The fix introduced by this patch is to force the qf/loc window back to
its original size each time the preview window closed. This fix is a bit
hacky, but it seems to work well.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants