From 5b3b837da877e05395c2b572ad9f9e7a64a4c2c1 2006-11-30 15:59:48 From: walter.doerwald Date: 2006-11-30 15:59:48 Subject: [PATCH] Reset scroll position when refreshing. --- diff --git a/IPython/Extensions/ibrowse.py b/IPython/Extensions/ibrowse.py index 998e998..da8f9e5 100644 --- a/IPython/Extensions/ibrowse.py +++ b/IPython/Extensions/ibrowse.py @@ -424,6 +424,7 @@ class _BrowserLevel(object): self.iterator = ipipe.xiter(self.input) self.items.clear() self.exhausted = False + self.datastartx = self.datastarty = 0 self.moveto(0, 0, refresh=True) def refreshfind(self): @@ -442,9 +443,11 @@ class _BrowserLevel(object): self.fetch(len(self.items)+1) if self.exhausted: curses.beep() + self.datastartx = self.datastarty = 0 self.moveto(self.curx, 0, refresh=True) break if self.items[-1].item == oldobject: + self.datastartx = self.datastarty = 0 self.moveto(self.curx, len(self.items)-1, refresh=True) break