       @showHighlight()
 
   resetBackground: ->
-    $('.line').css('background-color', '')
+    $('.line').css('background-color', '').css('border-bottom','')
 
   showHighlight: =>
-    rgba = "rgba(#{@wantedColor()}, #{@wantedOpacity()})"
+    bgColor = @wantedColor('backgroundRgbColor')
+    ulColor = @wantedColor('underlineRgbColor')
+    bgRgba = "rgba(#{bgColor}, #{@wantedOpacity()})"
+    ulRgba = "rgba(#{ulColor},1)"
     cursorViews = @editorView.getCursorViews()
     for cursorView in cursorViews
       range = cursorView.getScreenPosition()
       lineElement = @editorView.lineElementForScreenRow(range.row)
-      $(lineElement).attr('style', "background-color: #{rgba}")
+      $(lineElement).attr('style', "background-color: #{bgRgba}; border-bottom: 1px #{underlineStyleInUsed} #{ulRgba};")
 
-  wantedColor: ->
-    wantedColor = atom.config.get('highlight-line.backgroundRgaColor')
+  wantedColor: (color) ->
+    wantedColor = atom.config.get("highlight-line.#{color}")
     if wantedColor?.split(',').length isnt 3
-      wantedColor = @defaultBgColor
+      wantedColor = @defaultColors[color]
     wantedColor
 
   wantedOpacity: ->

    @div class: 'highlight-view hidden'

  initialize: (@editorView) ->
    @defaultBgColor = "100, 100, 100"
    @defaultOpacity = 50
    @subscribe @editorView, 'cursor:moved', @updateSelectedLine
    @subscribe @editorView, 'selection:changed', @updateSelectedLine
    @subscribe @editorView.getPane(), 'pane:active-item-changed',
      @updateSelectedLine
    @subscribe @editorView, 'core:close', @destroy
    @updateSelectedLine()

  # Tear down any state and detach
  destroy: =>

{$} = require 'atom'

lines = []
underlineStyles = ["solid","dotted","dashed"]
underlineStyleInUsed = ''

module.exports =
  configDefaults:
    enable: true
    backgroundRgbColor: "100, 100, 100"
    opacity: "50%"
    underline:
      solid: true
      dotted: false
      dashed: false
    underlineRgbColor: "255, 165, 0"

  activate: ->
    atom.workspaceView.eachEditorView (editorView) ->
