Fix bug with ALEPrevious for blank lines.

ALEPrevious (as well as ALEPreviousWrap) does not work if there is an
error in empty line like 'W391: blank line at end of file' in python.
This commit is contained in:
ilex
2017-08-13 11:56:41 +03:00
parent e6b6146731
commit bc548b2ef9
2 changed files with 11 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ function! ale#loclist_jumping#FindNearest(direction, wrap) abort
\ {
\ 'bufnr': bufnr(''),
\ 'lnum': l:item.lnum,
\ 'col': min([max([l:item.col, 1]), len(getline(l:item.lnum))]),
\ 'col': min([max([l:item.col, 1]), max([len(getline(l:item.lnum)), 1])]),
\ },
\ l:search_item
\)