positron
positron copied to clipboard
Console "remembers" previously run unfinished code
System details:
Windows 11
Positron and OS details:
Positron Version: 2024.10.0 (system setup) build 14 Code - OSS Version: 1.93.0 Commit: 901ab5d11d694212d32e53b97f771c5d601e428e Date: 2024-10-09T15:24:43.348Z Electron: 30.4.0 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.22631
Interpreter details:
R 4.4.1
Describe the issue:
After "unfinished" code (e.g. unclosed bracket) is run and cleared, later codes do not run normally as the console "remembers" the previous unfinished code.
Steps to reproduce the issue:
- Start an R document
- Enter in document
if (TRUE) {
print("hello")
# } # deliberately left unclosed
- Run the code above in the document with
Ctrl/Cmd+Enter - Note that the code is now entered in Console.
- Now we realise we made a mistake → clear the console with
Ctrl/Cmd+AandBackspace - Fix the code:
if (TRUE) {
print("hello")
} # now fixed
7.Rerun the code in the document with Ctrl/Cmd+Enter
8. Weird thing happens in console. The code is not run and the console "remembers" the previous code:
>if (TRUE) {
+ print("hello")
+# } # deliberately left unclosed
+
+if (TRUE) {
+ print("hello")
+}
Expected or desired behavior:
The console does not "remember" the wrong code
Were there any error messages in the UI, Output panel, or Developer Tools console?
No