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

QuickGotoCommand.doCommand()   C

Complexity

Conditions 8

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 0 Features 3
Metric Value
c 5
b 0
f 3
dl 0
loc 19
rs 6.6666
cc 8
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