From c0057dd2adba31c0467ea020a10f2ee5bb7646a2 Mon Sep 17 00:00:00 2001 From: Tamas Pal Date: Wed, 19 Jul 2017 11:58:06 +0200 Subject: [PATCH] Don't show errors on recent VIM versions. VIM 7.4 patch 258.1 broke some ShowMarks, it displays the following error a lot: E885: Not possible to change sign ShowMark72 Fix taken from this Google Groups discussion: https://groups.google.com/forum/#!topic/vim_use/i_FRMtA5R60 --- plugin/showmarks.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/showmarks.vim b/plugin/showmarks.vim index affd240..a5dc1b7 100644 --- a/plugin/showmarks.vim +++ b/plugin/showmarks.vim @@ -374,7 +374,9 @@ fun! s:ShowMarks() let mark_at{ln} = nm if !exists('b:placed_'.nm) || b:placed_{nm} != ln exe 'sign unplace '.id.' buffer='.winbufnr(0) - exe 'sign place '.id.' name=ShowMark'.nm.' line='.ln.' buffer='.winbufnr(0) + if ln > 0 " conditional which tests for the line number as greater than 0 " + exe 'sign place '.id.' name=ShowMark'.nm.' line='.ln.' buffer='.winbufnr(0) + endif " end conditional " let b:placed_{nm} = ln endif endif