I’ve been trying to do a key binding that uses “find_under_prev”. So far, this code doesn’t work for me (it does nothing):
class FindUnderExpandBackwardCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.run_command("find_under_prev")
# copy, regions = copy_regions(self.view)
# if len(copy) > 0:
# regions.clear()
# a, b = copy[0].a, copy[0].b
# regions.add(sublime.Region(a, b))
# self.view.run_command('find_under_prev')
# regions.add_all(copy)
On the other hand, if I replace
self.view.run_command("find_under_prev")
with, say,
self.view.run_command("toggle_comment")
the keyboard shortcut works as expected: comment is toggled.
Is there some bug with “find_under_prev”? Can someone replicate/test this behavior?
Thanks!
PS: I’m on mac, build 3176