Skip to content

Commit

Permalink
Merge pull request danr#22 from CharlesGueunet/fixSplit
Browse files Browse the repository at this point in the history
Improve split robustness to handle Kakoune master
  • Loading branch information
Dan Rosén authored Mar 9, 2020
2 parents 4359cac + 9a74138 commit 0ca7545
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easymotion.kak
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ def _on_key -hidden -params .. %{
}}
}

pydef 'easy-motion-on-selections -params 0..3' '%opt{em_jumpchars}^%val{timestamp}^%arg{1}^%arg{2}^%arg{3}^%val{selections_desc}' %{
pydef 'easy-motion-on-selections -params ..3' '%opt{em_jumpchars}^%val{timestamp}^%arg{1}^%arg{2}^%arg{3}^%val{selections_desc}' %{
jumpchars, timestamp, direction, callback_chosen, callback_cancel, descs = stdin.strip().split("^")
if len(jumpchars) <= 1:
return 'fail em_jumpchars needs length at least two'
descs = descs.split(" ")
import re
descs = re.split("[^\d,.]+", descs)
from collections import OrderedDict, defaultdict
jumpchars = list(OrderedDict.fromkeys(jumpchars))
if direction == 't':
Expand Down

0 comments on commit 0ca7545

Please sign in to comment.