@@ -152,8 +152,8 @@ def run(self, edit, content):
152152
153153class FileDiffClipboardCommand (FileDiffCommand ):
154154 def run (self , edit , ** kwargs ):
155- current = sublime .get_clipboard ()
156- self .run_diff (self .diff_content (), current ,
155+ clipboard = sublime .get_clipboard ()
156+ self .run_diff (self .diff_content (), clipboard ,
157157 from_file = self .view .file_name (),
158158 to_file = '(clipboard)' ,
159159 external_diff_tool = kwargs .get ('cmd' , None ))
@@ -204,15 +204,7 @@ def run(self, edit, **kwargs):
204204
205205class FileDiffSavedCommand (FileDiffCommand ):
206206 def run (self , edit , ** kwargs ):
207- content = ''
208- for region in self .view .sel ():
209- if region .empty ():
210- continue
211- content += self .view .substr (region )
212- if not content :
213- content = self .view .substr (sublime .Region (0 , self .view .size ()))
214-
215- self .run_diff (self .read_file (self .view .file_name ()), content ,
207+ self .run_diff (self .read_file (self .view .file_name ()), self .diff_content (),
216208 from_file = self .view .file_name (),
217209 to_file = self .view .file_name () + u' (Unsaved)' ,
218210 external_diff_tool = kwargs .get ('cmd' , None ))
0 commit comments