TextEditor code dblclick

Hi !!!

I’m developing a plugin and I need to capture a dblclick (or click, it doesn’t matters) in code section. I was doing like this:

	atom.workspace.observeTextEditors((editor)=>{
        let editorView  = atom.views.getView(editor);
		editorView.addEventListener("dblclick", ()=>{
			//	... some code
		}
    });

But this is fired when minimap or scrollbar section is clicked too… and I don’t want this, I want only when code lines are clicked, so I changed to this code:

	atom.workspace.observeTextEditors((editor)=>{
        let editorView  = atom.views.getView(editor).getElementsByClassName("lines")[0];;
		editorView.addEventListener("dblclick", ()=>{
			//	... some code
		}
    });

This is the better way to do this or there is other better option to do it? (Using atom functions and not accesing DOM elements by class names…)

Thanks you very much !!!