Merged
Conversation
Closed
dawsbot
reviewed
Apr 27, 2020
| let position: Position = window.activeTextEditor.selection.end; | ||
| editBuilder.insert(position, relativeUrl); | ||
| // Get all selections | ||
| let selections = window.activeTextEditor.selections; |
Owner
There was a problem hiding this comment.
Can you teach me about how selections can be an array? I would assume this is just a string containing the characters currently highlighted.
Contributor
Author
There was a problem hiding this comment.
User may select a text (let's say 'pdf') and press Ctrl+D, this selects all the 'pdf' text in that file. This will lead to multiple selections.
dawsbot
requested changes
Apr 27, 2020
package-lock.json
Outdated
| "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.34.tgz", | ||
| "integrity": "sha512-sUvpieq+HsWTLdkeOI8Mi8u22Ag3AoGuM3sv+XMP1bKtbaIAHpEA2f52K2mz6vK5PVhTa3bFyRZLZMqTxOo2Cw==", | ||
| "requires": { | ||
| "@types/events": "1.1.0", |
Owner
There was a problem hiding this comment.
No need for a diff to this file, can you remove these dependency changes so this PR is only the changed lines from extension.ts?
Contributor
Author
There was a problem hiding this comment.
I removed it. Does it reflect the same now?
Owner
Contributor
Author
There was a problem hiding this comment.
Done now. Could you please confirm?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #42
This pull request will enable user to replace selected text when inserting new relative path. In case of no selection, relative path will be entered in cursor position.