Skip to content

Use word under cursor for previewDataframe, nrow #137#141

Merged
Ikuyadeu merged 3 commits intoREditorSupport:masterfrom
andycraig:issue-137-word
Nov 9, 2019
Merged

Use word under cursor for previewDataframe, nrow #137#141
Ikuyadeu merged 3 commits intoREditorSupport:masterfrom
andycraig:issue-137-word

Conversation

@andycraig
Copy link
Copy Markdown
Collaborator

Closes #137

What problem did you solve?

This PR makes two changes:

  1. If there is no selection, the word under the cursor is used for r.previewDataframe and the r.nrow family of commands (r.nrow, r.length, r.head, r.thead, r.names);
  2. If multiple lines are selected, the r.nrow family of commands apply the function(s) to the whole selection, instead of to each line in the selection.

Before

Commands don't work when cursor is on iris:

word-before

Functions applied to each line in selection:

lines-before

After

word-after

lines-after

@MaTo04 Thank you for adding the r.nrow family of commands! Do you think these changes are okay?

@andycraig andycraig changed the title Use word under cursor for previewDataframe, nrow and apply once #137 Use word under cursor for previewDataframe, nrow #137 Nov 2, 2019
@andycraig
Copy link
Copy Markdown
Collaborator Author

I shortened the title to be within the recommended 50 characters for a commit subject.

@Ikuyadeu
Copy link
Copy Markdown
Member

Ikuyadeu commented Nov 9, 2019

@andycraig Great! Thank you for your fix!
After changing the LICENSE, I will publish this version.

@Ikuyadeu Ikuyadeu merged commit fb6aeeb into REditorSupport:master Nov 9, 2019
@andycraig
Copy link
Copy Markdown
Collaborator Author

@Ikuyadeu Thank you!

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.

Use variable under cursor for r.previewDataframe, r.nrow etc.

2 participants