diff options
author | Andrej Zieger <jerdna-regeiz@users.noreply.github.com> | 2019-05-22 09:14:10 +0200 |
---|---|---|
committer | Andrej Zieger <jerdna-regeiz@users.noreply.github.com> | 2019-05-26 19:32:32 +0200 |
commit | f2341164c661b007cf4fa3fa6605beb4579c5e8f (patch) | |
tree | d06bbe9f80c5c9fa81586f6f9315e94f5f0bcca4 /src | |
parent | 93e18e698e4d0251bec6e47c7f2ad0ca8d47c849 (diff) | |
download | rneovim-f2341164c661b007cf4fa3fa6605beb4579c5e8f.tar.gz rneovim-f2341164c661b007cf4fa3fa6605beb4579c5e8f.tar.bz2 rneovim-f2341164c661b007cf4fa3fa6605beb4579c5e8f.zip |
Changed sign_mark_adjust behaviour to match vim
Vim does not delete/free signs if they are placed on lines which get
deleted. In case of undo it does make a difference as in vim the sign
will be still available.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/sign.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/nvim/sign.c b/src/nvim/sign.c index 35605f8d23..b2f235d0be 100644 --- a/src/nvim/sign.c +++ b/src/nvim/sign.c @@ -656,11 +656,7 @@ void sign_mark_adjust(linenr_T line1, linenr_T line2, long amount, long amount_a next = sign->next; new_lnum = sign->lnum; if (sign->lnum >= line1 && sign->lnum <= line2) { - if (amount == MAXLNUM) { - *lastp = next; - xfree(sign); - continue; - } else { + if (amount != MAXLNUM) { new_lnum += amount; } } else if (sign->lnum > line2) { |