Going through the code I figured out the problem that is  that is causing save 
to fail when set to "All documents"--a classic Python bug.
If an item is deleted from a list while that list is being looped through, then 
it's like sawing off the branch of a tree you are sitting on. Here is the code:

    for i in range(len(docs)):
      doc = docs[i]
      ...
      docs.remove(doc)

The code will break with 'list index out of range' if a list member is
deleted.

There is a simple fix--just reverse the direction of the loop:

    for i in reversed(range(len(docs))):

I have submitted a patch that fixes both errors. Please head over to 
https://bugzilla.gnome.org/show_bug.cgi?id=659437
and mark the bug "confirmed" if you are getting the error described in this bug 
report.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gedit in Ubuntu.
https://bugs.launchpad.net/bugs/1244338

Title:
  External tool won't run if "Save" is set to "All documents"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/1244338/+subscriptions

-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to