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

Fix c on line beginning#1302 #1303

Merged
merged 5 commits into from
Feb 15, 2017
Merged

Conversation

xlaech
Copy link
Contributor

@xlaech xlaech commented Feb 15, 2017

Changed the c Action to encounter for cases where the selection ends at the beginning of a line.
The tests revealed, that s is implemented using c(0,0).

Therefore i check, if this is a real selection before calling the getLeftThroughLineBreaks() function

@@ -2080,13 +2080,16 @@ export class ChangeOperator extends BaseOperator {

public async run(vimState: VimState, start: Position, end: Position): Promise<VimState> {
const isEndOfLine = end.character === end.getLineEnd().character;
const isBeginning =
Copy link
Member

Choose a reason for hiding this comment

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

Position has a function called isLineBeginning() - could you use that one?

@xlaech
Copy link
Contributor Author

xlaech commented Feb 15, 2017

Sorry i got excited :)

@xlaech
Copy link
Contributor Author

xlaech commented Feb 15, 2017

just wait... i need to make sure the tests pass again

@johnfn
Copy link
Member

johnfn commented Feb 15, 2017

Cool, thanks for the PR!

@johnfn johnfn merged commit 1c67541 into VSCodeVim:master Feb 15, 2017
Chillee added a commit to Chillee/Vim that referenced this pull request Apr 24, 2017
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