GNOME Bugzilla – Bug 771498
Text pasted/entered in blank comparison can't be saved
Last modified: 2017-04-21 21:23:25 UTC
Meld can't save text entered/pasted in blank comparison. Preparation steps: 1.Start meld without arguments. 2.Press "file compariosn", then "blank comparison" 3.Paste some data in both windows Bug scenario 1 - crash while saving on window close: 4. Press close button on a window - a window suggesting saving appears 5. Press Save there - file selector appears for left pane 6. Enter file name in selector and press Save Result: file is not saved, meld crashes with: Traceback (most recent call last):
+ Trace 236669
response = page.on_delete_event()
response = self.check_save_modified()
self.save_file(i)
encoding = source_encoding.get_charset()
Bug scenario 2 - file is not saved after using save: 4. Select "Save as..." in context menu of a left file - file selector appears for left pane 5. Enter file name in selector and press Save Result: file is NOT saved, meld continues working without showing any GUI errors. same traceback in terminal.
Created attachment 335659 [details] [review] Simple fix: save file in utf-8 since there is no original encoding.
Review of attachment 335659 [details] [review]: Looks good to me, other than the minor style issue below. ::: meld/filediff.py @@ +1495,2 @@ source_encoding = bufdata.sourcefile.get_encoding() + if not source_encoding: #no encoding for new blank comparison Can you please fix this comment to be PEP8: either on its own line, or two spaces before the hash, and always one space after the hash. The general preference in new Meld code is on its own line, but whatever works for you.
Created attachment 335756 [details] [review] Simple fix: save file in utf-8 since there is no original encoding (review improvements).
Great, thanks. I've pushed your patch to master and the 3.16 branch.
*** Bug 781586 has been marked as a duplicate of this bug. ***
Thank you, Kai! I installed 3.16.3 and it works as expected.