command-t 1.12 → 1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.txt +6 -0
- data/doc/command-t.txt +6 -0
- data/plugin/command-t.vim +4 -4
- data/ruby/command-t.rb +2 -1
- data/ruby/command-t/controller.rb +1 -1
- data/ruby/command-t/ext.bundle +0 -0
- data/ruby/command-t/extconf.rb +20 -1
- data/ruby/command-t/match_window.rb +1 -0
- data/ruby/command-t/metadata.rb +8 -0
- data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +19 -8
- data/ruby/command-t/settings.rb +1 -0
- data/ruby/command-t/stub.rb +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46092d285a715fa372926a9ba7a6c9c52fd3bd83
|
4
|
+
data.tar.gz: 6cbb54f1c5e3be27a255812b04d82119bc179a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 370557a99ef3c9410797bf1abb003ede91f1e6c4177ea7ef811fcbf7c0ed4be846a6f0c01ea7125cce29aa7b8866dc9185e784b0ccce0a55277ae73c80ec3504
|
7
|
+
data.tar.gz: a0d3d1e129b3de1620947edd09bf22baab78219484f180b933e4dbcd65351b70ff75c3c006abce461b7e92805a1ad9a257d4b15b07a7f7ffadd45b796ac2fd06
|
data/README.txt
CHANGED
@@ -1291,6 +1291,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
1291
1291
|
|
1292
1292
|
HISTORY *command-t-history*
|
1293
1293
|
|
1294
|
+
1.13 (29 April 2015)
|
1295
|
+
|
1296
|
+
- avoid "W10: Warning: Changing a readonly file" when starting Vim in
|
1297
|
+
read-only mode (ie. as `view` or with the `-R` option)
|
1298
|
+
- fix infinite loop on |<Tab>| (regression introduced in 1.12)
|
1299
|
+
|
1294
1300
|
1.12 (9 April 2015)
|
1295
1301
|
|
1296
1302
|
- add |:CommandTLoad| command
|
data/doc/command-t.txt
CHANGED
@@ -1291,6 +1291,12 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
1291
1291
|
|
1292
1292
|
HISTORY *command-t-history*
|
1293
1293
|
|
1294
|
+
1.13 (29 April 2015)
|
1295
|
+
|
1296
|
+
- avoid "W10: Warning: Changing a readonly file" when starting Vim in
|
1297
|
+
read-only mode (ie. as `view` or with the `-R` option)
|
1298
|
+
- fix infinite loop on |<Tab>| (regression introduced in 1.12)
|
1299
|
+
|
1294
1300
|
1.12 (9 April 2015)
|
1295
1301
|
|
1296
1302
|
- add |:CommandTLoad| command
|
data/plugin/command-t.vim
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
" Copyright 2010-
|
1
|
+
" Copyright 2010-2015 Greg Hurrell. All rights reserved.
|
2
2
|
" Licensed under the terms of the BSD 2-clause license.
|
3
3
|
|
4
|
-
if exists(
|
4
|
+
if exists('g:command_t_loaded') || &cp
|
5
5
|
finish
|
6
6
|
endif
|
7
7
|
let g:command_t_loaded = 1
|
@@ -14,10 +14,10 @@ command! -nargs=? -complete=dir CommandT call commandt#CommandTShowFileFinder(<q
|
|
14
14
|
command! CommandTFlush call commandt#CommandTFlush()
|
15
15
|
command! CommandTLoad call commandt#CommandTLoad()
|
16
16
|
|
17
|
-
if !hasmapto(':CommandT<CR>') && maparg('<Leader>t', 'n')
|
17
|
+
if !hasmapto(':CommandT<CR>') && maparg('<Leader>t', 'n') ==# ''
|
18
18
|
silent! nnoremap <unique> <silent> <Leader>t :CommandT<CR>
|
19
19
|
endif
|
20
20
|
|
21
|
-
if !hasmapto(':CommandTBuffer<CR>') && maparg('<Leader>b', 'n')
|
21
|
+
if !hasmapto(':CommandTBuffer<CR>') && maparg('<Leader>b', 'n') ==# ''
|
22
22
|
silent! nnoremap <unique> <silent> <Leader>b :CommandTBuffer<CR>
|
23
23
|
endif
|
data/ruby/command-t.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
# Copyright 2014 Greg Hurrell. All rights reserved.
|
1
|
+
# Copyright 2014-2015 Greg Hurrell. All rights reserved.
|
2
2
|
# Licensed under the terms of the BSD 2-clause license.
|
3
3
|
|
4
4
|
module CommandT
|
5
5
|
autoload :Controller, 'command-t/controller'
|
6
6
|
autoload :Finder, 'command-t/finder'
|
7
|
+
autoload :Metadata, 'command-t/metadata'
|
7
8
|
autoload :MRU, 'command-t/mru'
|
8
9
|
autoload :MatchWindow, 'command-t/match_window'
|
9
10
|
autoload :PathUtilities, 'command-t/path_utilities'
|
data/ruby/command-t/ext.bundle
CHANGED
Binary file
|
data/ruby/command-t/extconf.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
# Copyright 2010-
|
1
|
+
# Copyright 2010-2015 Greg Hurrell. All rights reserved.
|
2
2
|
# Licensed under the terms of the BSD 2-clause license.
|
3
3
|
|
4
|
+
require 'pathname'
|
5
|
+
|
4
6
|
begin
|
5
7
|
require 'mkmf'
|
6
8
|
rescue LoadError
|
@@ -45,3 +47,20 @@ end
|
|
45
47
|
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
46
48
|
|
47
49
|
create_makefile('ext')
|
50
|
+
|
51
|
+
# Create `metadata.rb`, which is used to diagnose installation problems.
|
52
|
+
basedir = Pathname.new(__FILE__).dirname
|
53
|
+
(basedir + 'metadata.rb').open('w') do |f|
|
54
|
+
f.puts <<-END.gsub(/^ /, '')
|
55
|
+
# This file was generated by #{(basedir + 'extconf.rb').to_s}
|
56
|
+
module CommandT
|
57
|
+
module Metadata
|
58
|
+
EXPECTED_RUBY_VERSION = #{RUBY_VERSION.inspect}
|
59
|
+
EXPECTED_RUBY_PATCHLEVEL = #{
|
60
|
+
defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL.inspect : nil.inspect
|
61
|
+
}
|
62
|
+
UNKNOWN = false
|
63
|
+
end # module Metadata
|
64
|
+
end # module CommandT
|
65
|
+
END
|
66
|
+
end
|
@@ -52,6 +52,7 @@ module CommandT
|
|
52
52
|
set 'bufhidden', 'unload' # unload buf when no longer displayed
|
53
53
|
set 'buftype', 'nofile' # buffer is not related to any file
|
54
54
|
set 'modifiable', false # prevent manual edits
|
55
|
+
set 'readonly', false # avoid W10 "Changing a readonly file"
|
55
56
|
set 'swapfile', false # don't create a swapfile
|
56
57
|
set 'wrap', false # don't soft-wrap
|
57
58
|
set 'number', false # don't show line numbers
|
@@ -18,10 +18,10 @@ module CommandT
|
|
18
18
|
WatchmanError = Class.new(::RuntimeError)
|
19
19
|
|
20
20
|
def paths!
|
21
|
-
sockname =
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
sockname = extract_value(
|
22
|
+
Watchman::Utils.load(get_raw_sockname),
|
23
|
+
'sockname'
|
24
|
+
)
|
25
25
|
|
26
26
|
UNIXSocket.open(sockname) do |socket|
|
27
27
|
root = Pathname.new(@path).realpath.to_s
|
@@ -32,7 +32,7 @@ module CommandT
|
|
32
32
|
|
33
33
|
# root_restrict_files setting may prevent Watchman from working
|
34
34
|
# or enforce_root_files/root_files (>= version 3.1)
|
35
|
-
|
35
|
+
extract_value(result)
|
36
36
|
end
|
37
37
|
|
38
38
|
query = ['query', root, {
|
@@ -42,14 +42,25 @@ module CommandT
|
|
42
42
|
paths = Watchman::Utils.query(query, socket)
|
43
43
|
|
44
44
|
# could return error if watch is removed
|
45
|
-
|
46
|
-
|
47
|
-
paths['files']
|
45
|
+
extract_value(paths, 'files')
|
48
46
|
end
|
49
47
|
rescue Errno::ENOENT, WatchmanError
|
50
48
|
# watchman executable not present, or unable to fulfil request
|
51
49
|
super
|
52
50
|
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def extract_value(object, key = nil)
|
55
|
+
raise WatchmanError, object['error'] if object.has_key?('error')
|
56
|
+
object[key]
|
57
|
+
end
|
58
|
+
|
59
|
+
def get_raw_sockname
|
60
|
+
raw_sockname = %x{watchman --output-encoding=bser get-sockname}
|
61
|
+
raise WatchmanError, 'get-sockname failed' if !$?.exitstatus.zero?
|
62
|
+
raw_sockname
|
63
|
+
end
|
53
64
|
end # class WatchmanFileScanner
|
54
65
|
end # class FileScanner
|
55
66
|
end # class Scanner
|
data/ruby/command-t/settings.rb
CHANGED
data/ruby/command-t/stub.rb
CHANGED
@@ -3,10 +3,13 @@
|
|
3
3
|
|
4
4
|
module CommandT
|
5
5
|
class Stub
|
6
|
+
@@expected_version = Metadata::EXPECTED_RUBY_VERSION
|
7
|
+
@@expected_patchlevel = Metadata::EXPECTED_RUBY_PATCHLEVEL
|
6
8
|
@@patch_level = defined?(RUBY_PATCHLEVEL) ? RUBY_PATCHLEVEL : '[unknown]'
|
7
9
|
@@load_error = ['command-t.vim could not load the C extension',
|
8
10
|
'Please see INSTALLATION and TROUBLE-SHOOTING in the help',
|
9
11
|
"Vim Ruby version: #{RUBY_VERSION}-p#{@@patch_level}",
|
12
|
+
"Expected version: #{@@expected_version}-p#{@@expected_patchlevel}",
|
10
13
|
'For more information type: :help command-t']
|
11
14
|
|
12
15
|
[
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: command-t
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.13'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Hurrell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Command-T provides a fast, intuitive mechanism for opening files with a
|
@@ -43,6 +43,7 @@ files:
|
|
43
43
|
- ruby/command-t/match_window.rb
|
44
44
|
- ruby/command-t/matcher.c
|
45
45
|
- ruby/command-t/matcher.h
|
46
|
+
- ruby/command-t/metadata.rb
|
46
47
|
- ruby/command-t/mru.rb
|
47
48
|
- ruby/command-t/path_utilities.rb
|
48
49
|
- ruby/command-t/prompt.rb
|