OSDN Git Service

Fix for #948 (bug where not all text was copied to the clipboard when copying from...
authorMichael Curran <mick@kulgan.net>
Wed, 29 Sep 2010 23:57:31 +0000 (09:57 +1000)
committerMichael Curran <mick@kulgan.net>
Wed, 29 Sep 2010 23:57:31 +0000 (09:57 +1000)
commit85cfd61a1d3fef3d953847172905810d2613238b
tree5f5d158984e6b56d6589d93143bd13c0faa500ad
parent5d8d95d6a09af7572c33c0f3639f15ac55f33138
Fix for #948 (bug where not all text was copied to the clipboard when copying from flat review for a display model due to NULL characters). Specific changes:
*Implement a new clipboardText property on the base TextInfo class, which returns the text property, processed by convertCrlf.
*TextInfo.copyToClipboard: pass the clipboardText property to api.copyToClip rather than convertCrlf(self.text).
*Base virtualBuffer: rather than implementing a copyToClipboard method, instead implement a clipboardText property. It still inserts linefeeds in between block fields etc, but just returns the text, rather than copying it to the clipboard now of course.
*DisplayModelTextInfo: implement a clipboardText property, which fetches its super clipboardText property, but converts NULLs to spaces before returning.
source/displayModel.py
source/textInfos/__init__.py
source/virtualBuffers/__init__.py