setting: always clear scripts previous to adding global ones
authorPatrick Steinhardt <ps@pks.im>
Sat, 20 May 2017 08:36:40 +0000 (10:36 +0200)
committerPatrick Steinhardt <ps@pks.im>
Sat, 20 May 2017 08:36:40 +0000 (10:36 +0200)
commit34233193cba4bf1b0e91f3210660e20fc58e0be8
tree997639dc4ccacc24a9aced9f750bd2b71570c45c
parent445a420f4d16fe863744d5813496fecdcd62af86
setting: always clear scripts previous to adding global ones

Previous to adding user scripts to the content manager, we should always
clear existing scripts. Otherwise, e.g. in the sequence

    :set user-scripts=off
    :set user-scripts=on

we'd end up with the same global scripts injected twice.

Fix the issue by unconditionally clearing all user scripts previous to
adding scripts.
src/setting.c