Changeset 1572
- Timestamp:
- 08/07/08 18:14:29 (4 months ago)
- Location:
- trunk/peppy
- Files:
-
- 3 modified
-
frame.py (modified) (2 diffs)
-
fundamental.py (modified) (1 diff)
-
plugins/switch_buffers.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/peppy/frame.py
r1571 r1572 665 665 return False 666 666 667 def setBuffer(self, buffer, wrapper=None ):667 def setBuffer(self, buffer, wrapper=None, options=None): 668 668 if wrapper is None: 669 669 # this gets a default view for the selected buffer … … 672 672 assert self.dprint("set buffer to new view %s" % mode) 673 673 self.tabs.updateWrapper(wrapper) 674 674 if options: 675 mode.showInitialPosition(buffer.raw_url, options) 676 675 677 def newBuffer(self, buffer): 676 678 # proxy it up to tabs -
trunk/peppy/fundamental.py
r1505 r1572 608 608 line -= self.classprefs.line_number_offset 609 609 self.showLine(line) 610 if options: 611 self.setViewPositionData(options) 610 612 611 613 ##### Comment handling -
trunk/peppy/plugins/switch_buffers.py
r1569 r1572 47 47 last_buffer = "" 48 48 49 # Store options used to restore view state when switching back to a 50 # previous buffer 51 last_options = {} 52 49 53 def createList(self): 50 54 """Generate list of possible buffer names to complete. … … 72 76 if text in self.display_names: 73 77 self.__class__.last_buffer = mode.buffer.displayname 78 self.__class__.last_options[mode.buffer.displayname] = mode.getViewPositionData() 74 79 index = self.display_names.index(text) 75 80 url = self.full_names[index] 76 dprint("found %s, switching to %s" % (text, url)) 77 wx.CallAfter(self.frame.setBuffer, url) 81 if text in self.__class__.last_options: 82 options = self.__class__.last_options[text] 83 else: 84 options = None 85 dprint("found %s, switching to %s with options %s" % (text, url, options)) 86 wx.CallAfter(self.frame.setBuffer, url, options=options) 78 87 else: 79 88 dprint("buffer %s doesn't exist" % text)
