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

Sentence selection #592

Merged
merged 2 commits into from
Aug 12, 2016
Merged

Sentence selection #592

merged 2 commits into from
Aug 12, 2016

Conversation

rebornix
Copy link
Member

Yay! We love PRs! 🎊

Please include a description of your change & check your PR against this list, thanks:

  • Commit message has a short title & issue references
  • Each commit does a logical chunk of work.
  • It builds and tests pass (e.g gulp tslint)

The code becomes complex when dealing with Vim' special logic of leading/trailing spaces handling.

const currentSentenceNonWhitespaceEnd = currentSentenceBegin.getCurrentSentenceEnd();

if (currentSentenceNonWhitespaceEnd.isBefore(position)) {
// The cursor is on a trailing white space.
Copy link
Member Author

Choose a reason for hiding this comment

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

The thing is Vim has a weird mechanism of handling leading or trailing spaces. The logic should be shared between words, sentences or paragraphs but since Vim is handling word, sentence and paragraph 's boundary differently, I still don't find a good way to reduce these redundant if-else statements. Will try later.

@rebornix rebornix merged commit faa45a1 into VSCodeVim:master Aug 12, 2016
@rebornix rebornix deleted the SentenceSelection branch August 12, 2016 05:44
This pull request was closed.
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