Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Apr 29, 2015
  1. Fix infinite loop on <tab>

    Whoops; a typo meant we were wrapping `#toggle_focus` in a guard, and
    then wrapping the wrapped version in another guard, which meant that it
    would end up calling itself repeatedly. Ouch.
    The added regression spec isn't super awesome; it passes with the fix,
    but hangs without the fix, so it is more documentation of what went
    wrong than a real regression test per-se.
Commits on Apr 13, 2015
  1. Avoid W10 when running in read-only mode

    This was originally reported here:
    But for some reason it didn't repro for me then, but it definitely does
    now, with both `vim -R` and `view`. As soon as we try to make an
    assignment to `@@buffer[...]` Vim issues the warning.
    Make sure this doesn't happen by explicitly setting `noreadonly` in the
    "GoToFile" buffer.
  2. Clear CommandTMRUBuffer augroup before adding to it

    It's true that this entire file is protected by a guard, but in case
    somebody really, really wants to re-evaluate it they could use `:unlet`
    to circumvent the guard and then re-source the file.
    So, let's just follow standard best practice of clearing the entire
    augroup before adding to it.
  3. Pacify Vint

    Vint[0] is a vimscript linter. This commit makes some tweaks based on
    its suggestions. I don't think it found any substantive issues, but it
    makes sense for Command-T to be "clean" according to the linter.
    Issues addressed in this commit:
    - prefer single quotes over doubles (nothing potentially harmful was
      changed here)
    - use `function!` in "autoload/" (found a couple that I'd missed)
    - use `abort` keyword with "autoload/" functions (no real behavior
      change here, as all the functions a pretty much just one-liners that
      call Ruby, so there is on distinction between aborting and continuing)
    - explicitly choose case-sensitive string comparison (meaningless for
      empty strings, but let's do it anyway to keep the linter happy)
Commits on Apr 11, 2015
  1. Add a regression spec for the recent Watchman clowntownery

    Rejigged things a bit in the scanner in order to make faking an error
    condition more straightforward, then we just verify that it falls back
    to the superclass.
  2. Handle Watchman errors a little more fine-grainedly

    Although, the `` check is unlikely to fire; it seems
    that Watchman always returns with an exit code of 0 even for blatantly
    wrong invocations, and instead reports errors by the 'error' key in the
    results object.
Commits on Apr 10, 2015
  1. Eagerly load extension, to detect compilation problems earlier

    As noted in the previous commit, the logic here wasn't really doing much
    because we were only lazily loading the extension, so the likely
    codepath was:
    1. Try to load controller, fail
    2. Modify load path
    3. Try to load controller, succeed
    The comment in there about falling back to the stub if there was a
    problem with C extension wasn't really accurate. For example, if you
    forgot to compile the extension, you'd still go through the sequence
    above because we weren't even attempting to require it. Similarly, if
    you compiled with the wrong Ruby version, we wouldn't find out about it
    until later (and likely, with a segfault).
    So, this commit reworks the logic here to do two new things:
    - explicitly check run-time Ruby version against compile-time version;
      if we don't have metadata about the compile-time Ruby version we skip
      the check
    - eagerly load the extension so that we can report problems via the
      `Stub` as we originally intended; this will catch the case where the
      user forgets to compile
    Note that there is still one case that we can't handle, and that is the
    one where the extension was previously compiled with the wrong version
    of Ruby, but with an older version of Command-T so no metadata.rb file
    existed or was updated. In that scenario, we skip the version check and
    try to load the extension; because it exists but is the wrong version,
    we'll probably segfault. From experience, segfaults are pretty much
    assured if the mismatch is large (eg. 1.8.7 vs 2.0.0). If it's just a
    difference in patchlevel then you _might_ get a segfault at some later
    time (like during a search).
    In any case, I think this commit leaves us in a better place. I tested
    it with the following combinations:
    - mismatched `metadata.rb`: prints diagnostic info
    - unknown/default `metadata.rb`: loads and runs
    - missing extension: prints diagnostic info
    - unknown/default `metadata.rb` + big version mismatch (1.8.7 vs 2.0.0):
  2. Gather metadata and prepare to use it for installation diagnostics

    When you run `extconf.rb` we get the compile-time `RUBY_VERSION` and
    `RUBY_PATCHLEVEL` so that we can show it later on in a diagnostic
    message if you try to run in a version of Vim with a mismatched Ruby.
    Note that I say "prepare" to use it because in looking over this, I've
    realized that the existing `Stub` module is effectively useless. We're
    no longer eagerly loading the extension, which means that a failure to
    compile will never be the cause of us using `CommandT::Stub`. In fact,
    in order to get to the stub line, some other basic `require` has to have
    failed, which in turn means things are busted and the `require` for
    `Stub` likely won't work either.
    I'll address that in a separate commit.
  3. Fix incredibly clowny mis-nesting

    Because we were rescuing within the class body and not the method body,
    Watchman errors were bubbling up uncaught.
    I think this has been broken since 542ccd4, suggesting I need a
    regression test, which I will try and follow up with later.
  4. Improve Watchman error messages

    This isn't just about "unavailability". Let the Watchman error messages
    show through in the exception text; it may be helpful, such as:
    > CommandT::Scanner::FileScanner::WatchmanFileScanner::WatchmanError:
    > unable to resolve root [PATH]: none of the files listed in global
    > config root_restrict_files are present
Commits on Apr 9, 2015
  1. Make autocmd set-up consistent

    Put the `MatchWindow` autocmds in a group, and make the group names
    consistent across the project. Note that we don't need to worry about
    the `MatchWindow` autocmds leaking in normal use, because the window
    hangs around in the background and gets re-used.
Commits on Mar 17, 2015
Commits on Mar 11, 2015
  1. Doc: update AUTHORS

  2. Merge branch 'gh/ZyX-I/status-methods' into next

    * gh/ZyX-I/status-methods:
      Git: update .mailmap
      Clean up status-line methods
      Add methods useful for status lines
  3. Git: update .mailmap

  4. Clean up status-line methods

    One substantive fix in here:
    - add missing (unbalanced) paren in `commandt#CommandTPath` method
    And some other consistency/polish tweaks:
    - add some comments indicating what the added methods are for
    - use `&&` instead of `and`
    - remove redundant explicit `if`/`return true`/`else`/`return false`
    - allow `#path` and `#active_finder` methods to return `nil`; one of
      these requires a change to the caller to preserve desired behavior,
      but the other one can be left as-is (interpolating `nil` in a string
      is a no-op)
    - use parens around method parameter lists
  5. @ZyX-I
Commits on Mar 6, 2015
  1. Don't create empty class bodies

    Lurking on the Unicorn mailing list, I learnt that by avoiding creating
    a heavyweight class definition scope, you can save a couple hundred
Commits on Feb 28, 2015
  1. Merge branch 'gh/mathstuf/git-submodule-scan' into next

    Originally submitted at:
    * gh/mathstuf/git-submodule-scan:
      doc: Update for the new g:CommandTGitScanSubmodules option
      Make @scan_submodules code work
      Expect g:CommandTGitScanSubmodules to be a boolean
      git: add option for scanning submodules
  2. doc: Update for the new g:CommandTGitScanSubmodules option

    - whitespace fix
    - minor rewording, adding a link back to the `g:CommandTFileScanner`
    - updated HISTORY and AUTHORS sections
  3. Make @scan_submodules code work

    Based on mathstuf@e8c68da, but
Commits on Feb 10, 2015
  1. Update copyright year ranges

Commits on Feb 9, 2015
  1. Merge branch 'blueyed/fix-rxvt' into next

    * blueyed/fix-rxvt:
      doc: Update HISTORY for Daniel's rxvt patch
      Add `rxvt` to the pattern for terms where Escape should not be mapped
    Originally submitted at:
  2. @blueyed

    Add `rxvt` to the pattern for terms where Escape should not be mapped

    blueyed committed with
    Originally submitted in relation to:
    For some reason, had a merge conflict, so in applying it, I took the
    opportunity to alphabetize the alternatives within the regex.
    Signed-off-by: Greg Hurrell <>
  3. Merge branch 'blueyed/highlight-fix' into next

    * blueyed/highlight-fix:
      doc: Add info to HISTORY section for Daniel's patch
      DRY up repeated `#gsub` calls in `#get_cursor_highlight`
      Only use `highlight!` when needed
      Teach get_cursor_highlight to return an array
      Clean-up comments in MatchWindow#get_cursor_highlight
      Fix handling output of ":hi Cursor" with link + definition
    Originally submitted at:
    With some follow-up from me.
  4. Only use `highlight!` when needed

    As mentioned in ab15fa2, we previously used `:highlight` for
    everything, but the need to use `:highlight!` for some specific cases
    led us to use `:highlight!` for everything.
    This commit makes things a little more nuanced by marking the specific
    cases that need the bang, and using it only in those cases.
Something went wrong with that request. Please try again.