aboutsummaryrefslogtreecommitdiffstats
path: root/autoload
diff options
context:
space:
mode:
authorTeddy Wing2015-08-16 14:50:35 -0400
committerTeddy Wing2015-08-16 14:50:35 -0400
commit1c9fe852b40d4e7a883bcdc71c91abdd023514bb (patch)
treedf54fee21f1542d0af97bdfc49cb765b85581cef /autoload
parent71ec214cdb8814ecb71c837bf947583fda54d37e (diff)
downloadauditory.vim-1c9fe852b40d4e7a883bcdc71c91abdd023514bb.tar.bz2
Don't turn on Galaxy Far Far away when not `g:auditory_on`
My change from 71ec214cdb8814ecb71c837bf947583fda54d37e caused Galaxy Far Far Away sounds to be turned on any time you had `g:auditory_galaxy_far_far_away` turned on, regardless of whether `g:auditory_on` was also turned on. Fix this because we never want sounds to play when `g:auditory_on` is off. We now rely on `auditory#AssignInsertMappings()` to know whether to use Galaxy Far Far Away or default insert mode sounds. Need to toggle `g:auditory_galaxy_far_far_away` in that function because we're calling the toggle function so we need to set it to the opposite of what we want. In the future if we add more insert mode sounds we'll have to change this structure around but it should work for now.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/auditory.vim6
1 files changed, 2 insertions, 4 deletions
diff --git a/autoload/auditory.vim b/autoload/auditory.vim
index 994b64e..1e3d134 100644
--- a/autoload/auditory.vim
+++ b/autoload/auditory.vim
@@ -77,10 +77,8 @@ endfunction
function! auditory#AssignInsertMappings()
- augroup auditory#insert_mode
- autocmd!
- autocmd CursorMovedI * call auditory#PlayScale()
- augroup END
+ let g:auditory_galaxy_far_far_away = !g:auditory_galaxy_far_far_away
+ call auditory#ToggleGalaxyFarFarAway()
endfunction