≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #2055

Bug #2055: Command-T highlights selected files with Visual instead of PmenuSel

Kind bug
Product Command-T
When Created 2013-02-04T22:04:21Z, updated 2013-02-06T05:50:33Z
Status closed
Reporter indirect
Tags no tags

Description

Vim provides a color group for the selected item in a menu: PmenuSel. Command-T does not use that color group, and instead uses Visual. This produces many cases where it is extremely hard to see the file that is selected, when that file (arguably) should be the easiest to see. Other people have commented on this issue as well: https://wincent.dev/forums/command-t/topics/474.

Since the color is not user-configurable, please at least change the default color group to PmenuSel. Thanks!

Here is a diff of the change requested:

diff --git a/ruby/command-t/match_window.rb b/ruby/command-t/match_window.rb
index fb50eeb..769516b 100644
--- a/ruby/command-t/match_window.rb
+++ b/ruby/command-t/match_window.rb
@@ -88,7 +88,7 @@ module CommandT
         ::VIM::command "syntax match CommandTSelection \"^#{@@selection_marker}.\\+$\""
         ::VIM::command 'syntax match CommandTNoEntries "^-- NO MATCHES --$"'
         ::VIM::command 'syntax match CommandTNoEntries "^-- NO SUCH FILE OR DIRECTORY --$"'
-        ::VIM::command 'highlight link CommandTSelection Visual'
+        ::VIM::command 'highlight link CommandTSelection PmenuSel'
         ::VIM::command 'highlight link CommandTNoEntries Error'
         ::VIM::evaluate 'clearmatches()'

Here is a screenshot before the change (using Solarized.vim): http://files.arko.net/image/411v3f0X0517/content.png

Here is a screenshot of how it looks after switching to PmenuSel: http://files.arko.net/image/1R0n330p0n1T/content.png

Comments

  1. indirect 2013-02-04T22:05:45Z

    Ugh, I botched the diff formatting, and I can't edit the ticket. Here's the diff with a pre tag:

    diff --git a/ruby/command-t/match_window.rb b/ruby/command-t/match_window.rb
    index fb50eeb..769516b 100644
    --- a/ruby/command-t/match_window.rb
    +++ b/ruby/command-t/match_window.rb
    @@ -88,7 +88,7 @@ module CommandT
             ::VIM::command "syntax match CommandTSelection \"^#{@@selection_marker}.\\+$\""
             ::VIM::command 'syntax match CommandTNoEntries "^-- NO MATCHES --$"'
             ::VIM::command 'syntax match CommandTNoEntries "^-- NO SUCH FILE OR DIRECTORY --$"'
    -        ::VIM::command 'highlight link CommandTSelection Visual'
    +        ::VIM::command 'highlight link CommandTSelection PmenuSel'
             ::VIM::command 'highlight link CommandTNoEntries Error'
             ::VIM::evaluate 'clearmatches()'
    
  2. Larry Marburger 2013-02-04T22:52:24Z

    +1! I also prefer using PmenuSel over Visual and have applied this patch locally.

  3. Greg Hurrell 2013-02-06T03:51:15Z

    Thanks for the suggestion. I'll confirm that it looks ok with a some color schemes here and apply.

  4. Greg Hurrell 2013-02-06T05:50:27Z

    Looks good to me. I've landed it on the master branch. Will cut a release soon, as it's been a while since the last one.

  5. Greg Hurrell 2013-02-06T05:50:33Z

    Status changed:

    • From: new
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets