mirror of
https://github.com/wassname/pyreadline.git
synced 2026-07-23 13:00:19 +08:00
pyreadline: fix bug in copy_selection_to_clipboard. Didn't work when selection started at beginning of line.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user