Skip to content

Conversation

addaleax
Copy link
Collaborator

@addaleax addaleax commented May 7, 2021

…H-687

Instead of forwarding characters one-by-one to the REPL/readline
instance, group characters that do not have special meaning in a
REPL context together. This is relevant when pasting strings,
where multiple characters are read in rapid succession, and makes
the REPL behave a bit more closely to what e.g. the Node.js REPL
does in that case. There are two main advantages of this:

  • This makes tab-indented code behave well, because the REPL does
    not trigger autocompletion when seeing \tstring, only when
    seeing \t and string separately.
  • This makes input handling a bit faster, because e.g. the input
    highlighting needs to perform fewer operations for pasted code.

…H-687

Instead of forwarding characters one-by-one to the REPL/readline
instance, group characters that do not have special meaning in a
REPL context together. This is relevant when pasting strings,
where multiple characters are read in rapid succession, and makes
the REPL behave a bit more closely to what e.g. the Node.js REPL
does in that case. There are two main advantages of this:

- This makes tab-indented code behave well, because the REPL does
  not trigger autocompletion when seeing `\tstring`, only when
  seeing `\t` and `string` separately.
- This makes input handling a bit faster, because e.g. the input
  highlighting needs to perform fewer operations for pasted code.
Copy link
Contributor

@rose-m rose-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM 😊

@addaleax addaleax merged commit 274b196 into main May 7, 2021
@addaleax addaleax deleted the 687-dev branch May 7, 2021 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants