       if line isnt item.text
         changes.push({newText: line, item})
 
-    if changes.length
-      if not @provider.boundToEditor and (modifiedFilePaths = @getModifiedFilePathsInChanges(changes)).length
-        modifiedFilePathsAsString = modifiedFilePaths.map((filePath) -> " - `#{filePath}`").join("\n")
-        message = """
-          Cancelled `update-real-file`.
-          You are trying to update file which have **unsaved modification**.
-          But `narrow:#{@provider.getDashName()}` can not detect unsaved change.
-          To use `update-real-file`, you need to save these files.
-
-          #{modifiedFilePathsAsString}
-          """
+    return unless changes.length
+
+    unless @provider.boundToEditor
+      {success, message} = @ensureNoModifiedFileForChanges(changes)
+      unless success
         atom.notifications.addWarning(message, dismissable: true)
         return
 
-      @provider.updateRealFile(changes)
-      @setModifiedState(false)
+    {success, message} = @ensureNoConflictForChanges(changes)
+    unless success
+      atom.notifications.addWarning(message, dismissable: true)
+      return
+
+    @provider.updateRealFile(changes)
+    @setModifiedState(false)
 
   # This function is mapped from `narrow:close`
   # To differentiate `narrow:close` for protected narrow-editor.


    true

  getModifiedFilePathsInChanges: (changes) ->
    _.uniq(changes.map ({item}) -> item.filePath).filter (filePath) ->
      atom.project.isPathModified(filePath)

  observeStopChanging: ->
    @editor.onDidStopChanging =>

    lineText = String(point.row + 1)
    padding = " ".repeat(maxLineWidth - lineText.length)
    lineHeader = "#{@provider.indentTextForLineHeader}#{padding}#{lineText}"
    if @provider.showColumnOnLineHeader
      columnText = String(point.column + 1)
      padding = " ".repeat(maxColumnWidth - columnText.length)
      lineHeader = "#{lineHeader}:#{padding}#{columnText}"
    lineHeader + ": "
