Syntastic: Saved sessions reopen with both [Quickfix List] and empty [Location List] window

Created on 15 Jun 2015  路  2Comments  路  Source: vim-syntastic/syntastic

Problem

Sessions saved with populated [Location List] windows restore as a populated [Quickfix List] window and an empty [Location List] window.

This creates and unwanted, empty window in the tab and also changes the tab name to "location list"

The above was determined using

:ls

to view the open buffers in the tab.

Steps to replicate:

[1] Save a session that has at least one open tab and contains:

  • a buffer you are editing
  • an open Syntastic location list with syntax errors for that buffer

*The location list window with syntax errors should be populated and opened at startup given the .vimrc configuration listed in the "Environment" heading below.

:mksession somefile

[2] Quit vim

[3] Restore the session with

vim -S somefile

[3] Observe that the previously mentioned tab now contains

  • a buffer you are editing
  • an open, empty location list window
  • an open Syntastic quickfix list window with syntax errors for that buffer

Environment

  • Vim 7.4 / Ubuntu 14.04
  • .vimrc
NeoBundle 'scrooloose/syntastic'
"{{{
"Check if plugin loaded
if !empty(glob("~/.vim/bundle/syntastic/plugin/syntastic.vim")) 
    set statusline+=%#warningmsg#
    set statusline+=%{SyntasticStatuslineFlag()}
    set statusline+=%*

    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_reuse_loc_lists = 1
    let g:syntastic_javascript_checkers = ['jshint']

    " Navigation shortcuts for location window
    map <expr> <C-Down> (empty(getloclist(0))  ? "" : ":lnext")."\n"
    map <expr> <C-Up> (empty(getloclist(0))  ? "" : ":lp")."\n"
endif

" Set location list height to 3 lines
let g:syntastic_loc_list_height=3
"}}}

Most helpful comment

Try this:

set sessionoptions-=blank

(do that before saving your session, obviously).

All 2 comments

Try this:

set sessionoptions-=blank

(do that before saving your session, obviously).

Brilliant. That worked. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mollerhoj picture mollerhoj  路  5Comments

albasili picture albasili  路  6Comments

PROgram52bc picture PROgram52bc  路  6Comments

dunatotatos picture dunatotatos  路  6Comments

rafee picture rafee  路  5Comments