Need a feature to reload text file

Bug #714203 reported by Gene Woo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PyRoom
New
Undecided
Unassigned

Bug Description

In some cases, I edit the text files in two different editor (pyroom and VI). I do want to reload the content from disk.

VI for editing macro and some basic txt2tags formation.
pyroom will help me writing something.

I did a reload feature in my local copy, it just work, I didn't polish it. Here is my changes.

    def load_buffer(self):
        """ reload file = close and open """
        #Close current buffer
        autosave_fname = autosave.get_autosave_filename(
            self.buffers[self.current].filename
        )
        if os.path.isfile(autosave_fname):
            try:
                os.remove(autosave_fname)
            except OSError:
                raise PyroomError(_('Could not delete autosave file.'))
        if len(self.buffers) > 1:
            closedfilename = self.buffers[self.current].filename
            self.buffers.pop(self.current)
            self.current = min(len(self.buffers) - 1, self.current)
            self.set_buffer(self.current)
            # open last closed file
            self.open_file_no_chooser(closedfilename)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.