funced: don't source or save unmodified files

If funced is just used to inspect a function, there's no need to write
it to storage or to reload it.
This commit is contained in:
David Adam 2021-07-10 22:07:54 +08:00
parent 911269c4a9
commit 52eff27239

View File

@ -104,6 +104,8 @@ function funced --description 'Edit function definition'
set -l new_checksum (__funced_md5 "$tmpname")
if test "$new_checksum" = "$checksum"
echo (_ "Editor exited but the function was not modified")
# Don't source or save an unmodified file.
break
end
end