[pyrepl-checkins] r53416 - pyrepl/trunk/pyrepl/pyrepl
arigo at codespeak.net
arigo at codespeak.net
Sun Apr 6 10:15:40 CEST 2008
Author: arigo
Date: Sun Apr 6 10:15:38 2008
New Revision: 53416
Modified:
pyrepl/trunk/pyrepl/pyrepl/reader.py
Log:
It may be a matter of taste (or an emacs deformation),
but I find it far less invasive to display the messages
at the bottom of the input area instead of just above
the cursor position. (Old behavior still available by
setting msg_at_bottom = False).
Modified: pyrepl/trunk/pyrepl/pyrepl/reader.py
==============================================================================
--- pyrepl/trunk/pyrepl/pyrepl/reader.py (original)
+++ pyrepl/trunk/pyrepl/pyrepl/reader.py Sun Apr 6 10:15:38 2008
@@ -221,6 +221,8 @@
Helpful text may appear here at some point in the future when I'm
feeling more loquacious than I am now."""
+ msg_at_bottom = True
+
def __init__(self, console):
self.buffer = []
self.ps1 = "->> "
@@ -264,7 +266,7 @@
for ln, line in zip(range(len(lines)), lines):
ll = len(line)
if 0 <= p <= ll:
- if self.msg:
+ if self.msg and not self.msg_at_bottom:
for mline in self.msg.split("\n"):
screen.append(mline)
screeninfo.append((0, []))
@@ -287,6 +289,10 @@
screeninfo.append((0, l2[wrapcount*w - lp:]+[1]))
self.screeninfo = screeninfo
self.cxy = self.pos2xy(self.pos)
+ if self.msg and self.msg_at_bottom:
+ for mline in self.msg.split("\n"):
+ screen.append(mline)
+ screeninfo.append((0, []))
return screen
def bow(self, p=None):
More information about the pyrepl-checkins
mailing list