How to turn off wide selection background in Project View?

I cannot get used to it. Is there any option?
When I select file I want only this filename to be highlighted and not wide line.
You introduced this in PyCharm and now in Leda :(

Comment actions Permalink

I've downloaded source of IDEA.
There is no option to turn this off.
So I wrote the code to fix this in runtime.

Here is code in jruby (idea plugin PMIP). It's quite simple, one's can reuse it for any other script-lang idea plugin.

import com.intellij.ide.DataManager
import com.intellij.openapi.actionSystem.PlatformDataKeys

project = PlatformDataKeys::PROJECT.get_data(DataManager.instance.data_context)
projectView = com.intellij.ide.projectView.ProjectView.getInstance(project)
pane = projectView.getCurrentProjectViewPane()
if pane.nil?
  puts 'Project View is not yet loaded'

ui = pane.getTree().getUI()


  if (ui.java_kind_of?(com.intellij.util.ui.tree.WideSelectionTreeUI))

    f = ui.getClass().getDeclaredField("myWideSelection")


    f.set(ui, false)

    puts 'Tree wide selection fixed!'


  rescue NameError => e

    print 'Tree wide selection not fixed cause: ', e, "\n"



Please sign in to leave a comment.