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 } }