Avoid creating a new option when :set is used with a prefix of a name.

Fixes #450.
This commit is contained in:
Brian Huffman 2017-10-04 21:22:59 -07:00
parent a9de74ed5d
commit 4b386477ec

View File

@ -538,7 +538,7 @@ setUser name val = case lookupTrieExact name userOptions of
writeEnv v
writeEnv ev =
do optEff opt ev
modifyRW_ (\rw -> rw { eUserEnv = Map.insert name ev (eUserEnv rw) })
modifyRW_ (\rw -> rw { eUserEnv = Map.insert (optName opt) ev (eUserEnv rw) })
splitOptArgs :: String -> [String]
splitOptArgs = unfoldr (parse "")