I have build a plugin that replaces backslash with slash in current selection. But I get TypeError:Region required line 11
import sublime
import sublime_plugin
class ReplaceBackslashCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
selected = view.substr(view.sel()[0])
content = selected.replace('\\', '/')
print (content)
print (selected)
view.replace(edit, selected, content);