max397574 / better-escape.nvim

Map keys without delay when typing
GNU General Public License v3.0
629 stars 19 forks source link

fix: make the plugin work properly with v0.8-0.9 #65

Closed Sam-programs closed 3 months ago

Sam-programs commented 3 months ago

I reverted the feedkeys change because it need v10.0. I assume this Fixes #64

Sam-programs commented 3 months ago

Please. Don't look at the commits. I messed up while merging.

max397574 commented 3 months ago

not exactly sure why this change is needed also unfortunate that we have to use vim.schedule again

just one small thing if you're already work on this would it be possible to fix this? if function returns a string use this as expr?

if not I could merge it as is and will do it myself later

edit: nvm, saw second pr

Sam-programs commented 3 months ago

not exactly sure why this change is needed

The typed--2nd--parameter needs v10.0, otherwise it's always nil, so this check becomes useless:

vim.on_key(function(mappings, typed)
    if typed == "" then
        return
    end

I don't remember why the feedkeys calls needed that check though.