command-t 1.13 → 2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.txt +209 -67
  4. data/Rakefile +47 -57
  5. data/doc/command-t.txt +209 -67
  6. data/doc/tags +9 -0
  7. data/plugin/command-t.vim +22 -13
  8. data/ruby/command-t.rb +7 -2
  9. data/ruby/command-t/Makefile +32 -32
  10. data/ruby/command-t/controller.rb +33 -25
  11. data/ruby/command-t/depend +1 -1
  12. data/ruby/command-t/ext.bundle +0 -0
  13. data/ruby/command-t/ext.c +1 -1
  14. data/ruby/command-t/ext.h +1 -1
  15. data/ruby/command-t/extconf.rb +1 -1
  16. data/ruby/command-t/finder.rb +7 -1
  17. data/ruby/command-t/finder/buffer_finder.rb +5 -1
  18. data/ruby/command-t/finder/file_finder.rb +5 -1
  19. data/ruby/command-t/finder/jump_finder.rb +5 -1
  20. data/ruby/command-t/finder/mru_buffer_finder.rb +5 -1
  21. data/ruby/command-t/finder/tag_finder.rb +5 -1
  22. data/ruby/command-t/match.c +5 -2
  23. data/ruby/command-t/match.h +2 -1
  24. data/ruby/command-t/match_window.rb +36 -21
  25. data/ruby/command-t/matcher.c +12 -2
  26. data/ruby/command-t/matcher.h +1 -1
  27. data/ruby/command-t/metadata/fallback.rb +12 -0
  28. data/ruby/command-t/mru.rb +1 -1
  29. data/ruby/command-t/path_utilities.rb +1 -1
  30. data/ruby/command-t/prompt.rb +7 -6
  31. data/ruby/command-t/ruby_compat.h +1 -1
  32. data/ruby/command-t/scanner.rb +1 -1
  33. data/ruby/command-t/scanner/buffer_scanner.rb +1 -1
  34. data/ruby/command-t/scanner/file_scanner.rb +1 -4
  35. data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +1 -1
  36. data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +1 -1
  37. data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +3 -1
  38. data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +1 -1
  39. data/ruby/command-t/scanner/jump_scanner.rb +1 -1
  40. data/ruby/command-t/scanner/mru_buffer_scanner.rb +1 -1
  41. data/ruby/command-t/scanner/tag_scanner.rb +1 -1
  42. data/ruby/command-t/scm_utilities.rb +1 -1
  43. data/ruby/command-t/settings.rb +2 -1
  44. data/ruby/command-t/stub.rb +1 -1
  45. data/ruby/command-t/util.rb +1 -1
  46. data/ruby/command-t/vim.rb +3 -3
  47. data/ruby/command-t/vim/screen.rb +1 -1
  48. data/ruby/command-t/vim/window.rb +1 -1
  49. data/ruby/command-t/watchman.c +1 -1
  50. data/ruby/command-t/watchman.h +1 -1
  51. metadata +3 -4
  52. data/ruby/command-t/metadata.rb +0 -8
  53. data/ruby/command-t/scanner/file_scanner/file_limit_exceeded.rb +0 -10
data/plugin/command-t.vim CHANGED
@@ -1,23 +1,32 @@
1
- " Copyright 2010-2015 Greg Hurrell. All rights reserved.
1
+ " Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  " Licensed under the terms of the BSD 2-clause license.
3
3
 
4
- if exists('g:command_t_loaded') || &cp
4
+ if exists('g:command_t_loaded') || &compatible
5
5
  finish
6
6
  endif
7
7
  let g:command_t_loaded = 1
8
8
 
9
- command! CommandTBuffer call commandt#CommandTShowBufferFinder()
10
- command! CommandTJump call commandt#CommandTShowJumpFinder()
11
- command! CommandTMRU call commandt#CommandTShowMRUFinder()
12
- command! CommandTTag call commandt#CommandTShowTagFinder()
13
- command! -nargs=? -complete=dir CommandT call commandt#CommandTShowFileFinder(<q-args>)
14
- command! CommandTFlush call commandt#CommandTFlush()
15
- command! CommandTLoad call commandt#CommandTLoad()
9
+ command! CommandTBuffer call commandt#BufferFinder()
10
+ command! CommandTJump call commandt#JumpFinder()
11
+ command! CommandTMRU call commandt#MRUFinder()
12
+ command! CommandTTag call commandt#TagFinder()
13
+ command! -nargs=? -complete=dir CommandT call commandt#FileFinder(<q-args>)
14
+ command! CommandTFlush call commandt#Flush()
15
+ command! CommandTLoad call commandt#Load()
16
16
 
17
- if !hasmapto(':CommandT<CR>') && maparg('<Leader>t', 'n') ==# ''
18
- silent! nnoremap <unique> <silent> <Leader>t :CommandT<CR>
17
+ if !hasmapto('<Plug>(CommandT)') && maparg('<Leader>t', 'n') ==# ''
18
+ nmap <unique> <Leader>t <Plug>(CommandT)
19
19
  endif
20
+ nnoremap <silent> <Plug>(CommandT) :CommandT<CR>
20
21
 
21
- if !hasmapto(':CommandTBuffer<CR>') && maparg('<Leader>b', 'n') ==# ''
22
- silent! nnoremap <unique> <silent> <Leader>b :CommandTBuffer<CR>
22
+ if !hasmapto('<Plug>(CommandTBuffer)') && maparg('<Leader>b', 'n') ==# ''
23
+ nmap <unique> <Leader>b <Plug>(CommandTBuffer)
24
+ endif
25
+ nnoremap <silent> <Plug>(CommandTBuffer) :CommandTBuffer<CR>
26
+
27
+ if has('jumplist')
28
+ if !hasmapto('<Plug>(CommandTJump)') && maparg('<Leader>j', 'n') ==# ''
29
+ nmap <unique> <Leader>j <Plug>(CommandTJump)
30
+ endif
31
+ nnoremap <silent> <Plug>(CommandTJump) :CommandTJump<CR>
23
32
  endif
data/ruby/command-t.rb CHANGED
@@ -1,10 +1,15 @@
1
- # Copyright 2014-2015 Greg Hurrell. All rights reserved.
1
+ # Copyright 2014-present Greg Hurrell. All rights reserved.
2
2
  # Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  module CommandT
5
+ begin
6
+ require 'command-t/metadata'
7
+ rescue LoadError
8
+ require 'command-t/metadata/fallback'
9
+ end
10
+
5
11
  autoload :Controller, 'command-t/controller'
6
12
  autoload :Finder, 'command-t/finder'
7
- autoload :Metadata, 'command-t/metadata'
8
13
  autoload :MRU, 'command-t/mru'
9
14
  autoload :MatchWindow, 'command-t/match_window'
10
15
  autoload :PathUtilities, 'command-t/path_utilities'
@@ -11,12 +11,12 @@ ECHO = $(ECHO1:0=@echo)
11
11
  #### Start of system configuration section. ####
12
12
 
13
13
  srcdir = .
14
- topdir = /Users/glh/.rbenv/versions/2.0.0-p481/include/ruby-2.0.0
14
+ topdir = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0
15
15
  hdrdir = $(topdir)
16
- arch_hdrdir = /Users/glh/.rbenv/versions/2.0.0-p481/include/ruby-2.0.0/x86_64-darwin14.0.0
16
+ arch_hdrdir = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15
17
17
  PATH_SEPARATOR = :
18
18
  VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
- prefix = /Users/glh/.rbenv/versions/2.0.0-p481
19
+ prefix = $(DESTDIR)/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
20
20
  rubysitearchprefix = $(rubylibprefix)/$(sitearch)
21
21
  rubyarchprefix = $(rubylibprefix)/$(arch)
22
22
  rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
@@ -32,7 +32,7 @@ vendorlibdir = $(vendordir)/$(ruby_version)
32
32
  vendordir = $(rubylibprefix)/vendor_ruby
33
33
  sitearchdir = $(sitelibdir)/$(sitearch)
34
34
  sitelibdir = $(sitedir)/$(ruby_version)
35
- sitedir = $(rubylibprefix)/site_ruby
35
+ sitedir = $(DESTDIR)/Library/Ruby/Site
36
36
  rubyarchdir = $(rubylibdir)/$(arch)
37
37
  rubylibdir = $(rubylibprefix)/$(ruby_version)
38
38
  sitearchincludedir = $(includedir)/$(sitearch)
@@ -40,20 +40,20 @@ archincludedir = $(includedir)/$(arch)
40
40
  sitearchlibdir = $(libdir)/$(sitearch)
41
41
  archlibdir = $(libdir)/$(arch)
42
42
  ridir = $(datarootdir)/$(RI_BASE_NAME)
43
- mandir = $(datarootdir)/man
43
+ mandir = $(DESTDIR)/usr/share/man
44
44
  localedir = $(datarootdir)/locale
45
45
  libdir = $(exec_prefix)/lib
46
46
  psdir = $(docdir)
47
47
  pdfdir = $(docdir)
48
48
  dvidir = $(docdir)
49
49
  htmldir = $(docdir)
50
- infodir = $(datarootdir)/info
50
+ infodir = $(DESTDIR)/usr/share/info
51
51
  docdir = $(datarootdir)/doc/$(PACKAGE)
52
- oldincludedir = /usr/include
53
- includedir = $(prefix)/include
52
+ oldincludedir = $(DESTDIR)/usr/include
53
+ includedir = $(DESTDIR)/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk$(prefix)/include
54
54
  localstatedir = $(prefix)/var
55
55
  sharedstatedir = $(prefix)/com
56
- sysconfdir = $(prefix)/etc
56
+ sysconfdir = $(DESTDIR)/Library/Ruby/Site
57
57
  datadir = $(datarootdir)
58
58
  datarootdir = $(prefix)/share
59
59
  libexecdir = $(exec_prefix)/libexec
@@ -62,11 +62,11 @@ bindir = $(exec_prefix)/bin
62
62
  archdir = $(rubyarchdir)
63
63
 
64
64
 
65
- CC = clang
66
- CXX = clang++
67
- LIBRUBY = $(LIBRUBY_A)
65
+ CC = xcrun clang
66
+ CXX = xcrun clang++
67
+ LIBRUBY = $(LIBRUBY_SO)
68
68
  LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
69
- LIBRUBYARG_SHARED =
69
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
70
70
  LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
71
71
  empty =
72
72
  OUTFLAG = -o $(empty)
@@ -74,18 +74,18 @@ COUTFLAG = -o $(empty)
74
74
 
75
75
  RUBY_EXTCONF_H =
76
76
  cflags = $(optflags) $(debugflags) $(warnflags)
77
- optflags = -O3 -fno-fast-math
78
- debugflags = -ggdb3
79
- warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration
80
- CCDLFLAGS = -fno-common
81
- CFLAGS = $(CCDLFLAGS) -O3 -Wno-error=shorten-64-to-32 -pipe $(ARCH_FLAG)
77
+ optflags =
78
+ debugflags = -g
79
+ warnflags =
80
+ CCDLFLAGS =
81
+ CFLAGS = $(CCDLFLAGS) -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS $(ARCH_FLAG)
82
82
  INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
83
83
  DEFS = -DWATCHMAN_BUILD
84
- CPPFLAGS = -DHAVE_FCNTL_H -DHAVE_STDINT_H -DHAVE_SYS_ERRNO_H -DHAVE_SYS_SOCKET_H -DHAVE_RUBY_ST_H -DHAVE_ST_H -I/Users/glh/.rbenv/versions/2.0.0-p481/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
85
- CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
86
- ldflags = -L. -L/Users/glh/.rbenv/versions/2.0.0-p481/lib
84
+ CPPFLAGS = -DHAVE_FCNTL_H -DHAVE_STDINT_H -DHAVE_SYS_ERRNO_H -DHAVE_SYS_SOCKET_H -DHAVE_RUBY_ST_H -DHAVE_ST_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
85
+ CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG) -g -Os -pipe $(ARCH_FLAG)
86
+ ldflags = -L. -L/usr/local/lib
87
87
  dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress
88
- ARCH_FLAG =
88
+ ARCH_FLAG = -arch i386 -arch x86_64
89
89
  DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
90
90
  LDSHARED = $(CC) -dynamic -bundle
91
91
  LDSHAREDXX = $(CXX) -dynamic -bundle
@@ -93,13 +93,13 @@ AR = ar
93
93
  EXEEXT =
94
94
 
95
95
  RUBY_INSTALL_NAME = ruby
96
- RUBY_SO_NAME = ruby
96
+ RUBY_SO_NAME = ruby.2.0.0
97
97
  RUBYW_INSTALL_NAME =
98
98
  RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
99
99
  RUBYW_BASE_NAME = rubyw
100
100
  RUBY_BASE_NAME = ruby
101
101
 
102
- arch = x86_64-darwin14.0.0
102
+ arch = universal-darwin15
103
103
  sitearch = $(arch)
104
104
  ruby_version = 2.0.0
105
105
  ruby = $(bindir)/ruby
@@ -132,7 +132,7 @@ extout =
132
132
  extout_prefix =
133
133
  target_prefix =
134
134
  LOCAL_LIBS =
135
- LIBS = -lpthread -lpthread -ldl -lobjc
135
+ LIBS = $(LIBRUBYARG_SHARED) -lpthread -lpthread -ldl -lobjc
136
136
  ORIG_SRCS = ext.c match.c matcher.c watchman.c
137
137
  SRCS = $(ORIG_SRCS)
138
138
  OBJS = ext.o match.o matcher.o watchman.o
@@ -144,12 +144,12 @@ DLLIB = $(TARGET).bundle
144
144
  EXTSTATIC =
145
145
  STATIC_LIB =
146
146
 
147
- BINDIR = $(DESTDIR)$(bindir)
148
- RUBYCOMMONDIR = $(DESTDIR)$(sitedir)$(target_prefix)
149
- RUBYLIBDIR = $(DESTDIR)$(sitelibdir)$(target_prefix)
150
- RUBYARCHDIR = $(DESTDIR)$(sitearchdir)$(target_prefix)
151
- HDRDIR = $(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)
152
- ARCHHDRDIR = $(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)
147
+ BINDIR = $(bindir)
148
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
149
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
150
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
151
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
152
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
153
153
 
154
154
  TARGET_SO = $(DLLIB)
155
155
  CLEANLIBS = $(TARGET).bundle
@@ -236,7 +236,7 @@ $(DLLIB): $(OBJS) Makefile
236
236
 
237
237
 
238
238
  ###
239
- # Copyright 2010-2014 Greg Hurrell. All rights reserved.
239
+ # Copyright 2010-present Greg Hurrell. All rights reserved.
240
240
  # Licensed under the terms of the BSD 2-clause license.
241
241
 
242
242
  CFLAGS += -Wall -Wextra -Wno-unused-parameter
@@ -1,4 +1,4 @@
1
- # Copyright 2010-2015 Greg Hurrell. All rights reserved.
1
+ # Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  # Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  module CommandT
@@ -25,8 +25,6 @@ module CommandT
25
25
  end
26
26
 
27
27
  def initialize
28
- @prompt = Prompt.new
29
-
30
28
  encoding = VIM::get_string('g:CommandTEncoding')
31
29
  if encoding
32
30
  begin
@@ -151,17 +149,18 @@ module CommandT
151
149
  guard :refresh
152
150
 
153
151
  def flush
152
+ @file_finder = nil
154
153
  @max_height = nil
155
154
  @min_height = nil
156
- @file_finder = nil
155
+ @prompt = nil
157
156
  @tag_finder = nil
158
157
  end
159
158
  guard :flush
160
159
 
161
160
  def handle_key
162
161
  key = ::VIM::evaluate('a:arg').to_i.chr
163
- if @focus == @prompt
164
- @prompt.add! key
162
+ if @focus == prompt
163
+ prompt.add! key
165
164
  @needs_update = true
166
165
  else
167
166
  @match_window.find key
@@ -170,16 +169,16 @@ module CommandT
170
169
  guard :handle_key
171
170
 
172
171
  def backspace
173
- if @focus == @prompt
174
- @prompt.backspace!
172
+ if @focus == prompt
173
+ prompt.backspace!
175
174
  @needs_update = true
176
175
  end
177
176
  end
178
177
  guard :backspace
179
178
 
180
179
  def delete
181
- if @focus == @prompt
182
- @prompt.delete!
180
+ if @focus == prompt
181
+ prompt.delete!
183
182
  @needs_update = true
184
183
  end
185
184
  end
@@ -194,7 +193,7 @@ module CommandT
194
193
 
195
194
  def toggle_focus
196
195
  @focus.unfocus # old focus
197
- @focus = @focus == @prompt ? @match_window : @prompt
196
+ @focus = @focus == prompt ? @match_window : prompt
198
197
  @focus.focus # new focus
199
198
  end
200
199
  guard :toggle_focus
@@ -215,34 +214,34 @@ module CommandT
215
214
  guard :select_prev
216
215
 
217
216
  def clear
218
- @prompt.clear!
217
+ prompt.clear!
219
218
  list_matches!
220
219
  end
221
220
  guard :clear
222
221
 
223
222
  def clear_prev_word
224
- @prompt.clear_prev_word!
223
+ prompt.clear_prev_word!
225
224
  list_matches!
226
225
  end
227
226
  guard :clear_prev_word
228
227
 
229
228
  def cursor_left
230
- @prompt.cursor_left if @focus == @prompt
229
+ prompt.cursor_left if @focus == prompt
231
230
  end
232
231
  guard :cursor_left
233
232
 
234
233
  def cursor_right
235
- @prompt.cursor_right if @focus == @prompt
234
+ prompt.cursor_right if @focus == prompt
236
235
  end
237
236
  guard :cursor_right
238
237
 
239
238
  def cursor_end
240
- @prompt.cursor_end if @focus == @prompt
239
+ prompt.cursor_end if @focus == prompt
241
240
  end
242
241
  guard :cursor_end
243
242
 
244
243
  def cursor_start
245
- @prompt.cursor_start if @focus == @prompt
244
+ prompt.cursor_start if @focus == prompt
246
245
  end
247
246
  guard :cursor_start
248
247
 
@@ -258,10 +257,12 @@ module CommandT
258
257
  return unless @needs_update || options[:force]
259
258
 
260
259
  @matches = @active_finder.sorted_matches_for(
261
- @prompt.abbrev,
260
+ prompt.abbrev,
262
261
  :case_sensitive => case_sensitive?,
263
262
  :limit => match_limit,
264
- :threads => CommandT::Util.processor_count
263
+ :threads => CommandT::Util.processor_count,
264
+ :ignore_spaces => VIM::get_bool('g:CommandTIgnoreSpaces'),
265
+ :recurse => VIM::get_bool('g:CommandTRecursiveMatch', true),
265
266
  )
266
267
  @match_window.matches = @matches
267
268
 
@@ -283,6 +284,12 @@ module CommandT
283
284
 
284
285
  private
285
286
 
287
+ def prompt
288
+ @prompt ||= Prompt.new(
289
+ :cursor_color => VIM::get_string('g:CommandTCursorColor')
290
+ )
291
+ end
292
+
286
293
  def scm_markers
287
294
  markers = VIM::get_string('g:CommandTSCMDirectories')
288
295
  markers = markers && markers.split(/\s*,\s*/)
@@ -303,9 +310,10 @@ module CommandT
303
310
  :match_window_reverse => VIM::get_bool('g:CommandTMatchWindowReverse'),
304
311
  :min_height => min_height,
305
312
  :debounce_interval => VIM::get_number('g:CommandTInputDebounce') || 50,
306
- :prompt => @prompt
307
- @focus = @prompt
308
- @prompt.focus
313
+ :prompt => prompt,
314
+ :name => "Command-T [#{@active_finder.name}]"
315
+ @focus = prompt
316
+ prompt.focus
309
317
  register_for_key_presses
310
318
  set_up_autocmds
311
319
  clear # clears prompt and lists matches
@@ -324,7 +332,7 @@ module CommandT
324
332
  end
325
333
 
326
334
  def case_sensitive?
327
- if @prompt.abbrev.match(/[A-Z]/)
335
+ if prompt.abbrev.match(/[A-Z]/)
328
336
  if VIM::exists?('g:CommandTSmartCase')
329
337
  smart_case = VIM::get_bool('g:CommandTSmartCase')
330
338
  else
@@ -402,7 +410,7 @@ module CommandT
402
410
 
403
411
  def map(key, function, param = nil)
404
412
  ::VIM::command "noremap <silent> <buffer> #{key} " \
405
- ":call CommandT#{function}(#{param})<CR>"
413
+ ":call commandt#private##{function}(#{param})<CR>"
406
414
  end
407
415
 
408
416
  def term
@@ -457,7 +465,7 @@ module CommandT
457
465
  def set_up_autocmds
458
466
  ::VIM::command 'augroup CommandTController'
459
467
  ::VIM::command 'autocmd!'
460
- ::VIM::command 'autocmd CursorHold <buffer> :call CommandTListMatches()'
468
+ ::VIM::command 'autocmd CursorHold <buffer> :call commandt#private#ListMatches()'
461
469
  ::VIM::command 'augroup END'
462
470
  end
463
471
 
@@ -1,4 +1,4 @@
1
- # Copyright 2010-2014 Greg Hurrell. All rights reserved.
1
+ # Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  # Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  CFLAGS += -Wall -Wextra -Wno-unused-parameter
Binary file
data/ruby/command-t/ext.c CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2010-2014 Greg Hurrell. All rights reserved.
1
+ // Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  // Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  #include "matcher.h"
data/ruby/command-t/ext.h CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2010-2014 Greg Hurrell. All rights reserved.
1
+ // Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  // Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  #include <ruby.h>
@@ -1,4 +1,4 @@
1
- # Copyright 2010-2015 Greg Hurrell. All rights reserved.
1
+ # Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  # Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  require 'pathname'
@@ -1,4 +1,4 @@
1
- # Copyright 2010-2014 Greg Hurrell. All rights reserved.
1
+ # Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  # Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  require 'command-t/ext' # CommandT::Matcher, CommandT::Watchman::Utils
@@ -23,6 +23,12 @@ module CommandT
23
23
  raise RuntimeError, 'Subclass responsibility'
24
24
  end
25
25
 
26
+ # Returns a human-readable name describing the finder, for display in the
27
+ # statusline attached to the MatchWindow buffer.
28
+ def name
29
+ raise RuntimeError, 'Subclass responsibility'
30
+ end
31
+
26
32
  # Options:
27
33
  # :limit (integer): limit the number of returned matches
28
34
  def sorted_matches_for(str, options = {})
@@ -1,4 +1,4 @@
1
- # Copyright 2010-2014 Greg Hurrell. All rights reserved.
1
+ # Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
  # Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  module CommandT
@@ -8,6 +8,10 @@ module CommandT
8
8
  @scanner = Scanner::BufferScanner.new
9
9
  @matcher = Matcher.new @scanner, :always_show_dot_files => true
10
10
  end
11
+
12
+ def name
13
+ 'Buffers'
14
+ end
11
15
  end # class BufferFinder
12
16
  end # class Finder
13
17
  end # CommandT