Skip to content

Commit

Permalink
Fix copy on read only text (#4169)
Browse files Browse the repository at this point in the history
* Fix copy from readonly code

* Fix xmp text
  • Loading branch information
rchiodo committed Jan 28, 2019
1 parent 3190d6f commit 4d62591
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/2 Fixes/4168.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ctrl+c to work in code that has already been entered
2 changes: 1 addition & 1 deletion src/datascience-ui/history-react/cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class Cell extends React.Component<ICellProps> {
// Output may have goofy ascii colorization chars in it. Try
// colorizing if we don't have html that needs <xmp> around it (ex. <type ='string'>)
try {
if (formatted.includes('<')) {
if (!formatted.includes('<')) {
const converter = new ansiToHtml();
const html = converter.toHtml(formatted);
copy.data = {
Expand Down
2 changes: 1 addition & 1 deletion src/datascience-ui/history-react/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class Code extends React.Component<ICodeProps, ICodeState> {
theme: `${this.props.codeTheme} default`,
mode: 'python',
cursorBlinkRate: -1,
readOnly: readOnly ? 'nocursor' : false,
readOnly: readOnly ? true : false,
lineWrapping: true
}
}
Expand Down

0 comments on commit 4d62591

Please sign in to comment.