projects
/
super-star-trek.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8083dcb
)
avoid trailing newlines to cause scroll-pausing.
author
Stas P
<stas@stas.(none)>
Tue, 14 Dec 2010 15:02:16 +0000
(18:02 +0300)
committer
Stas P
<stas@stas.(none)>
Tue, 14 Dec 2010 15:02:16 +0000
(18:02 +0300)
sst.py
patch
|
blob
|
history
diff --git
a/sst.py
b/sst.py
index 966795cf654b93d490dc529fe57ab63760065feb..94f8103e95e93979e3fc3f4e2f8a861c44427ff2 100755
(executable)
--- a/
sst.py
+++ b/
sst.py
@@
-3161,16
+3161,11
@@
def skip(i):
"Skip i lines. Pause game if this would cause a scrolling event."
for dummy in range(i):
if game.options & OPTION_CURSES:
"Skip i lines. Pause game if this would cause a scrolling event."
for dummy in range(i):
if game.options & OPTION_CURSES:
- (y, x) = curwnd.getyx()
- (my, mx) = curwnd.getmaxyx()
- if curwnd == message_window and y >= my - 2:
- pause_game()
- clrscr()
- else:
- try:
- curwnd.move(y+1, 0)
- except curses.error:
- pass
+ (y, x) = curwnd.getyx()
+ try:
+ curwnd.move(y+1, 0)
+ except curses.error:
+ pass
else:
global linecount
linecount += 1
else:
global linecount
linecount += 1
@@
-3182,6
+3177,11
@@
def skip(i):
def proutn(line):
"Utter a line with no following line feed."
if game.options & OPTION_CURSES:
def proutn(line):
"Utter a line with no following line feed."
if game.options & OPTION_CURSES:
+ (y, x) = curwnd.getyx()
+ (my, mx) = curwnd.getmaxyx()
+ if curwnd == message_window and y >= my - 2:
+ pause_game()
+ clrscr()
curwnd.addstr(line)
curwnd.refresh()
else:
curwnd.addstr(line)
curwnd.refresh()
else: