New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console: tab behaviour when pasting from clipboard #1164
Comments
It can be dangerous!! check this example: killme: does [q]
f: func [][
ki: 1
ki(TAB);comment
] pasting above code in the console: killme: does [q]
; func [][q]
f: func [][
[ ki: 1
[ killme;comment
[ ]
; func [][ki: 1 killme] Calling the harmless 'f function! will call the could be evil 'killme function! |
Fixed by commit 7ee272a5. |
Not fixed, at least not on MacOS and Linux |
Yes. CLI console still has this issue. |
Actually in CLI console I cannot distinguish between the text from keyboard, and the text from clipboard. |
nodejs has the same issue, probably because they also can't differentiate between typed vs pasted. |
There is a nice solution working on MacOS and Linux: "Bracketed paste mode". |
Please reopen this one. 8-) |
@qtxie We can try that proposed solution, though it works probably only on Unix terminals, not in Windows DOS console. |
👍 |
Could the tab autocompletion differentiate between typed TAB key and pasted text form clipboard containing tabs? If yes, tab autocompletion should probably always be turned off in such cases.
Currently, pasting this text
sys(TAB)123
will return:red>> system123
I'm not sure what would be the best solution, I think if pasting outside a string definition, tabs should be converted to spaces, so in the case above I should get:
red>> sys 123
with tab autocomplete turned off.
When pasting text containing tabs into a string definition (after an open
{
or an open"
) tab autocompleting should be turned off and tabs converted to^-
, same treatment as CR and LF currently get.So it would be great if after:
red>> {
pasting a string like
sys(TAB)is(TAB)(LF)great}
would return:red>> {sys^-is^-^/great}
The text was updated successfully, but these errors were encountered: