Skip to content

Commit

Permalink
Removed delay between backspaces (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickeb96 authored and laughedelic committed Dec 24, 2018
1 parent c4233de commit 9cb1a6a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions functions/_pisces_backspace.fish
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
function _pisces_backspace -d "Overrides backspace to handle empty pairs removal"

for pair in $pisces_pairs
_pisces_remove (string split -- ',' $pair)
and return 0
set -l line (commandline | string join \n)
set -l index (commandline -C)
if [ $index -ge 1 ]
set -l char (string sub -s $index -l 1 "$line")
for pair in $pisces_pairs
set -l var (string split -- ',' $pair)
if [ $var[1] = $char ]
_pisces_remove $var
and return 0
end
end
end

commandline -f backward-delete-char
Expand Down

0 comments on commit 9cb1a6a

Please sign in to comment.