Changeset 115:172947fc6a88
- Timestamp:
- 07/12/08 11:46:56
(5 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
Fix crash when pasting text from external source.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r80 |
r115 |
|
| 384 | 384 | // paste occurring, have text take on the styles it had when it was |
|---|
| 385 | 385 | // cut/copied |
|---|
| 386 | | foreach (style; cachedStyles) { |
|---|
| 387 | | StyleRange newStyle = cast(StyleRange)style.clone(); |
|---|
| 388 | | newStyle.start = style.start + event.start; |
|---|
| 389 | | text.setStyleRange(newStyle); |
|---|
| | 386 | if( cachedStyles !is null ){ |
|---|
| | 387 | foreach (style; cachedStyles) { |
|---|
| | 388 | StyleRange newStyle = cast(StyleRange)style.clone(); |
|---|
| | 389 | newStyle.start = style.start + event.start; |
|---|
| | 390 | text.setStyleRange(newStyle); |
|---|
| | 391 | } |
|---|
| 390 | 392 | } |
|---|
| 391 | 393 | } |
|---|