mirror of
https://github.com/wassname/pyreadline.git
synced 2026-10-02 12:40:27 +08:00
Fixing get_history_item indexing to be 1 based, fixes bug #760901
This commit is contained in:
1 parent
1d71dec2a0
commit
18cb7fe6ca
1 file changed
+2
-2
@@ -49,8 +49,8 @@ class LineHistory(object):
|
||||
return value
|
||||
|
||||
def get_history_item(self, index):
|
||||
u'''Return the current contents of history item at index.'''
|
||||
item = self.history[index]
|
||||
u'''Return the current contents of history item at index (starts with index 1).'''
|
||||
item = self.history[index - 1]
|
||||
log(u"get_history_item: index:%d item:%r"%(index, item))
|
||||
return item.get_line_text()
|
||||
|
||||
|
||||
Reference in new issue
Block a user