projects
/
pygdb.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
973cf63
)
fixing bug, when getting text from terminal: started at line -1
author
Stefan Huber <shuber2@gmail.com>
Tue, 10 Jun 2008 11:47:22 +0000
(13:47 +0200)
committer
Stefan Huber <shuber2@gmail.com>
Tue, 10 Jun 2008 11:47:22 +0000
(13:47 +0200)
DbgTerminal.py
patch
|
blob
|
history
diff --git
a/DbgTerminal.py
b/DbgTerminal.py
index 11eaf5c35ee2cdf4a7f2629716b69fe5f2394e85..e9a706fffcdb793ba81e7d3d027ef48d010d1c39 100644
(file)
--- a/
DbgTerminal.py
+++ b/
DbgTerminal.py
@@
-59,7
+59,7
@@
class DbgTerminal (vte.Terminal):
def contents_changed(self, term):
c,r = term.get_cursor_position()
def contents_changed(self, term):
c,r = term.get_cursor_position()
- text = self.get_text_range(
self.getHistoryLen()-1
,0,r,-1,lambda *w:True)
+ text = self.get_text_range(
max(self.getHistoryLen()-1,0)
,0,r,-1,lambda *w:True)
#Remove annoying \n at the end
assert(text[-1] == "\n")
#Remove annoying \n at the end
assert(text[-1] == "\n")
@@
-76,6
+76,8
@@
class DbgTerminal (vte.Terminal):
self.history += [l+"\n" for l in lines[:-1]]
self.history += [lines[-1]]
self.history += [l+"\n" for l in lines[:-1]]
self.history += [lines[-1]]
+ assert(r == self.getHistoryLen()-1)
+
def waitForNewline(self):
l = self.getHistoryLen()
def waitForNewline(self):
l = self.getHistoryLen()