From 86043c64e84d2c5cd1291fb7e38f5e5a8caf7134 2006-06-28 11:47:33 From: walter.doerwald Date: 2006-06-28 11:47:33 Subject: [PATCH] Give the ibrowse cursor row a blue background. Fix fetching new display rows when the browser scrolls more than a screenful (e.g. by using the goto command). --- diff --git a/IPython/Extensions/ibrowse.py b/IPython/Extensions/ibrowse.py index ce305a4..d597d59 100644 --- a/IPython/Extensions/ibrowse.py +++ b/IPython/Extensions/ibrowse.py @@ -85,7 +85,7 @@ class _BrowserCachedItem(object): class _BrowserHelp(object): - style_header = astyle.Style.fromstr("red:blacK") + style_header = astyle.Style.fromstr("yellow:black:bold") # This is used internally by ``ibrowse`` for displaying the help screen. def __init__(self, browser): self.browser = browser @@ -340,7 +340,7 @@ class _BrowserLevel(object): # drop rows from the end del self.displayrows[self.datastarty-olddatastarty:] # fetch new items - for i in xrange(olddatastarty-1, + for i in xrange(min(olddatastarty, self.datastarty+self.mainsizey)-1, self.datastarty-1, -1): try: row = self.getrow(i) @@ -352,7 +352,7 @@ class _BrowserLevel(object): # drop rows from the start del self.displayrows[:self.datastarty-olddatastarty] # fetch new items - for i in xrange(olddatastarty+self.mainsizey, + for i in xrange(max(olddatastarty+self.mainsizey, self.datastarty), self.datastarty+self.mainsizey): try: row = self.getrow(i) @@ -862,7 +862,7 @@ class ibrowse(ipipe.Display): Return a style for displaying the original style ``style`` in the row the cursor is on. """ - return astyle.Style(style.fg, style.bg, style.attrs | astyle.A_BOLD) + return astyle.Style(style.fg, astyle.COLOR_BLUE, style.attrs | astyle.A_BOLD) def report(self, msg): """ diff --git a/doc/ChangeLog b/doc/ChangeLog index 7b1dbbf..75f6a3f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2006-06-28 Walter Doerwald + + * IPython/Extensions/ibrowse.py: Give the ibrowse cursor row + a blue background. Fix fetching new display rows when the browser + scrolls more than a screenful (e.g. by using the goto command). + 2006-06-27 Ville Vainio * Magic.py (_inspect, _ofind) Apply David Huard's