Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
longlines: Silence error if pattern wasn't found
  • Loading branch information
tomtom committed May 23, 2014
1 parent 1fbb4e8 commit 50d4650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/quickfixsigns/longlines.vim
Expand Up @@ -3,7 +3,7 @@
" @git: http://github.com/tomtom/quickfixsigns_vim/
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Last Change: 2012-10-02.
" @Revision: 510
" @Revision: 515

if exists('g:quickfixsigns#longlines#loaded')
finish
Expand Down Expand Up @@ -49,7 +49,7 @@ function! quickfixsigns#longlines#GetList(filename) "{{{3
if width > 0
let pos = getpos('.')
try
exec 'g/\%>'. width .'v./'
exec 'silent g/\%>'. width .'v./'
\ 'call add(signs, {"bufnr": bufnr, "lnum": line("."), "text": "Long line"})'
finally
call setpos('.', pos)
Expand Down

3 comments on commit 50d4650

@cj
Copy link

@cj cj commented on 50d4650 May 23, 2014

Choose a reason for hiding this comment

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

Thank you, that fixed it. I've noticed that it only shows up in the gutter in .vim files, in other file types like .rb, .html etc... it will show the error in airline but it won't show the icon in the gutter. I'm trying to find out what is causing this, I'll let you know what I find.

@tomtom
Copy link
Owner Author

@tomtom tomtom commented on 50d4650 May 23, 2014 via email

Choose a reason for hiding this comment

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

@cj
Copy link

@cj cj commented on 50d4650 May 23, 2014

Choose a reason for hiding this comment

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

ah looks like that was the issue, for some reason tw was only set for .vim files and not the rest. Correcting that fixed all the issues. It's working perfectly now. Thank you again!

Please sign in to comment.