pyreadline: fix bug in copy_selection_to_clipboard. Didn't work when selection started at beginning of line.

This commit is contained in:
jstenar
2007-05-29 18:04:51 +00:00
parent a07c16aa3d
commit 7beb54f1a1
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -1,3 +1,7 @@
2007-05-24 Jörgen Stenarson <jorgen.stenarson -at- bostream.nu>
* Fixing bug in copy_selection_to_clipboard. Didn't work
when selection started at beginning of line
2007-05-24 Jörgen Stenarson <jorgen.stenarson -at- bostream.nu>
* Additions to manual
+1 -1
View File
@@ -717,7 +717,7 @@ class ReadLineTextBuffer(TextLine):
def copy_selection_to_clipboard(self): # ()
'''Copy the text in the region to the windows clipboard.'''
if self.enable_win32_clipboard and self.enable_selection and self.selection_mark>0:
if self.enable_win32_clipboard and self.enable_selection and self.selection_mark>=0:
selection_mark=min(self.selection_mark,len(self.line_buffer))
cursor=min(self.point,len(self.line_buffer))
if self.selection_mark==-1: