git @ Cat's Eye Technologies tideay / df61221
Move cursor to top when syncing buffer from disk. Less annoying. Chris Pressey 10 years ago
2 changed file(s) with 1 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
195195 (Argument against: maybe it was accidental and buffer is only remaining
196196 copy of what was there. Maybe "deaden" the buffer. Maybe recreate the
197197 file...)
198 * When opening a new file, cursor position is at bottom of file, but
199 view is scrolled to top of file. Maybe move cursor to top, too.
200198
201199 ### other wild ideas ###
202200
364364 self.buffer.begin_not_undoable_action()
365365 self.buffer.set_text(self.file_text) # TODO: check utf-8 correctness
366366 self.buffer.end_not_undoable_action()
367 self.buffer.place_cursor(self.buffer.get_start_iter())
367368 return True
368369
369370 def save_to_disk(self):