fish/functions/_autopair_backspace.fish 323 B raw
1
function _autopair_backspace
2
    set --local index (commandline --cursor)
3
    set --local buffer (commandline)
4
5
    test $index -ge 1 &&
6
        contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs &&
7
        commandline --function delete-char
8
    commandline --function backward-delete-char
9
end