Completed
Pull Request — master (#5)
by
unknown
50s queued 16s
created

QuickGotoVariableCommand.run()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 2
rs 10
cc 1
1
# coding=utf-8
2
import sublime
3
import sublime_plugin
4
import re
5
6
class QuickGotoFileCommand(QuickGotoCommand):
7
    def run(self, edit):
8
        for sel in self.view.sel():
9
            if sel.empty():
10
                self.view.window().run_command("show_overlay", {"overlay": "goto", "show_files": True})
11
            else:
12
                word_sel = self.view.substr(sel)
13
                word_sel = word_sel.strip()
14
                self.view.window().run_command("show_overlay", {"overlay": "goto", "show_files": True, "text": word_sel})
15
                self.view.window().run_command("select_all")
16
        
17