Skip to content
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

Add evaluate to point #1061

Merged
merged 7 commits into from
Mar 9, 2021
Merged

Add evaluate to point #1061

merged 7 commits into from
Mar 9, 2021

Conversation

PEZ
Copy link
Collaborator

@PEZ PEZ commented Mar 8, 2021

What has Changed?

  • Add command for evaluating up to cursor, ctrl+alt+enter

image

  • Restructured evaluation code a bit to accept functions that evaluate to the selection and the text, rather than using a lot of boolean params and that if/else hell.
  • Introduced a module get-text.ts where some of these functions live
  • Also added three variables to custom REPL snippets
    1. $selection
    2. $head - the text between the start of line and the cursor (So the above command can be created with a custom snippets, even if now noone needs to 😄
    3. $tail - the text between the cursor and the end of the list (No idea when this would ever be needed, but symmetry)

Fixes #1057

My Calva PR Checklist

I have:

  • Read How to Contribute.
  • Directed this pull request at the dev branch. (Or have specific reasons to target some other branch.)
  • Made sure I have changed the PR base branch, so that it is not published. (Sorry for the nagging.)
  • Updated the [Unreleased] entry in CHANGELOG.md, linking the issue(s) that the PR is addressing.
  • Figured if anything about the fix warrants tests on Mac/Linux/Windows/Remote/Whatever, and either tested it there if so, or mentioned it in the PR.
  • Tested the VSIX built from the PR (so, after you've submitted the PR). You'll find the artifacts by clicking Show all checks in the CI section of the PR page, and then Details on the ci/circleci: build test. NB: There is a CircleCI bug that makes the Artifacts hard to find. Please see this issue for workarounds.
    • Tested the particular change
    • Figured if the change might have some side effects and tested those as well.
    • Smoke tested the extension as such.
  • Referenced the issue I am fixing/addressing in a commit message for the pull request.
  • Added to or updated docs in this branch, if appropriate

Ping @PEZ, @kstehn, @cfehse, @bpringe

@PEZ PEZ merged commit 5ba71d1 into dev Mar 9, 2021
@PEZ PEZ deleted the 1057-evaluate-to-point branch March 9, 2021 07:41
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.

1 participant