From 4d62591baf3a7387254a4d0580d52f4aa146ebf2 Mon Sep 17 00:00:00 2001 From: Rich Chiodo Date: Mon, 28 Jan 2019 10:37:15 -0800 Subject: [PATCH] Fix copy on read only text (#4169) * Fix copy from readonly code * Fix xmp text --- news/2 Fixes/4168.md | 1 + src/datascience-ui/history-react/cell.tsx | 2 +- src/datascience-ui/history-react/code.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 news/2 Fixes/4168.md diff --git a/news/2 Fixes/4168.md b/news/2 Fixes/4168.md new file mode 100644 index 000000000000..521375523577 --- /dev/null +++ b/news/2 Fixes/4168.md @@ -0,0 +1 @@ +Fix ctrl+c to work in code that has already been entered diff --git a/src/datascience-ui/history-react/cell.tsx b/src/datascience-ui/history-react/cell.tsx index c88ef238195c..04934a67e30a 100644 --- a/src/datascience-ui/history-react/cell.tsx +++ b/src/datascience-ui/history-react/cell.tsx @@ -345,7 +345,7 @@ export class Cell extends React.Component { // Output may have goofy ascii colorization chars in it. Try // colorizing if we don't have html that needs around it (ex. <type ='string'>) try { - if (formatted.includes('<')) { + if (!formatted.includes('<')) { const converter = new ansiToHtml(); const html = converter.toHtml(formatted); copy.data = { diff --git a/src/datascience-ui/history-react/code.tsx b/src/datascience-ui/history-react/code.tsx index 18d8279ad82c..be16d7d11263 100644 --- a/src/datascience-ui/history-react/code.tsx +++ b/src/datascience-ui/history-react/code.tsx @@ -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 } }