From 7f0c948cd31b2308a163bea994817430ef74e7ef 2006-11-30 15:43:46 From: walter.doerwald Date: 2006-11-30 15:43:46 Subject: [PATCH] Enhance cmd_refreshfind docstring. Don't change cursor column even if the object can't be found. --- diff --git a/IPython/Extensions/ibrowse.py b/IPython/Extensions/ibrowse.py index c35b432..998e998 100644 --- a/IPython/Extensions/ibrowse.py +++ b/IPython/Extensions/ibrowse.py @@ -442,7 +442,7 @@ class _BrowserLevel(object): self.fetch(len(self.items)+1) if self.exhausted: curses.beep() - self.moveto(0, 0, refresh=True) + self.moveto(self.curx, 0, refresh=True) break if self.items[-1].item == oldobject: self.moveto(self.curx, len(self.items)-1, refresh=True) @@ -1383,7 +1383,8 @@ class ibrowse(ipipe.Display): def cmd_refreshfind(self): """ Refreshes the display by restarting the iterator and goes back to the - same object as before (if it can be found in the new iterator). + same object the cursor was on before restarting (if this object can't be + found the cursor jumps back to the first object). """ level = self.levels[-1] self.report("refreshfind")