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

QuickGotoCommand   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 5
Bugs 0 Features 3
Metric Value
wmc 8
c 5
b 0
f 3
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A QuickGotoFileCommand.run() 0 9 3
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