     else
       search = @search.bind(null, _.escapeRegExp(@options.word))
       Promise.all(@options.projects.map(search)).then (values) =>
-        @items = _.flatten(values)
+        items = _.flatten(values)
+        @injectMaxRow(items)
+        @items = items
+
+  injectMaxRow: (items) ->
+    # Inject textWidthForLastRow field to each item just for make row header aligned.
+    items = items.filter((item) -> not item.skip) # normal item only
+    maxRow = Math.max((items.map (item) -> item.point.row)...)
+    textWidthForLastRow = String(maxRow + 1).length
+    for item in items
+      item.textWidthForLastRow = textWidthForLastRow
 
   search: (pattern, project) ->
     items = []


ProviderBase = require './provider-base'
settings = require '../settings'

runCommand = (options) ->
  new BufferedProcess(options).onWillThrowError ({error, handle}) ->

        true

  getRowHeaderForItem: (item) ->
    "    " + padStringLeft(String(item.point.row + 1), item.textWidthForLastRow) + ":"

  viewForItem: (item) ->
    if item.header?
