diff options
| author | Teddy Wing | 2015-07-28 00:03:23 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-07-28 00:03:23 -0400 |
| commit | 5aab2fb74706849d914b23166efb3fa251d96e67 (patch) | |
| tree | 938467968ed10d3e3d53121ed97d77008768d9c3 /plugin | |
| parent | db37f84e67f2e20a33348453f6c1d351741f2f1e (diff) | |
| download | auditory.vim-5aab2fb74706849d914b23166efb3fa251d96e67.tar.bz2 | |
autoload/auditory.vim: Restore user mappings when turning off
In `auditory#Unmap()`, after unmapping Auditory maps, remap user-defined
mappings.
Say you redefined `j` -> `gj`. When turning Auditory off, we would
previously just unmap `j`, resulting in `j` -> `j`. Now that we're
restoring user mapppings, `j` once again gets mapped to `gj`.
Also keep track of the mode that Auditory uses for its mappings when
storing a user-defined mapping so that we're only saving and restoring
them if they're defined in the mode used by Auditory.
User mappings get saved in `auditory#AssignMappings()`, or the function
that essentially turns on the plugin.
Fix the `if` condition that checks `if l:user_mapping`. This gave me a
lot of trouble because I needed to match it against emtpy string,
instead of a boolean condition. Use the proper condition to get it
actually working.
Diffstat (limited to 'plugin')
0 files changed, 0 insertions, 0 deletions
