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

Use vscode built in support for block cursors #245

Merged
merged 1 commit into from
Jun 7, 2016

Conversation

Paxxi
Copy link
Contributor

@Paxxi Paxxi commented Jun 6, 2016

Added some simple tests for this and moved it out of the hot path as it's something that only happens during mode changes.

@jpoon
Copy link
Member

jpoon commented Jun 6, 2016

@Paxxi sweet! there's a minor tslint error that's making the build fail

[16:16:39] [gulp-tslint] error mode/modeHandler.ts[195, 13]: unused variable: '_caretDecoration'

@Paxxi
Copy link
Contributor Author

Paxxi commented Jun 6, 2016

Ahh right, forgot to run tslint, will fix tomorrow

@Paxxi
Copy link
Contributor Author

Paxxi commented Jun 7, 2016

Fixed the tslint error and rewrote it a bit to make it a bit shorter


modeHandler.setCurrentModeByName(ModeName.Insert);
assert.equal(vscode.window.activeTextEditor.options.cursorStyle, vscode.TextEditorCursorStyle.Line);
});
Copy link
Member

Choose a reason for hiding this comment

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

Can you add another case here for Visual mode?

@Paxxi
Copy link
Contributor Author

Paxxi commented Jun 7, 2016

Ok added the test case.

Note for the future, I can be sloppy sometimes in PR's so don't hesitate to "nitpick", I expect it 😄

@jpoon
Copy link
Member

jpoon commented Jun 7, 2016

@Paxxi one more tiny thing, can you merge the latest changes from master to this branch?

@Paxxi
Copy link
Contributor Author

Paxxi commented Jun 7, 2016

done

@jpoon
Copy link
Member

jpoon commented Jun 7, 2016

Fixes #132! Thanks @Paxxi!

@jpoon jpoon closed this Jun 7, 2016
@jpoon jpoon reopened this Jun 7, 2016
@jpoon jpoon merged commit 36fcf42 into VSCodeVim:master Jun 7, 2016
@johnfn
Copy link
Member

johnfn commented Jun 8, 2016

@Paxxi unfortunately this makes visual line mode confusing :( In visual line mode, the block cursor is often in the middle of the linewise selection (Vim will always select the entire line the cursor is in, no matter if it's at the beginning or the end).

Can you find any way to fix this? Otherwise we'll have to revert, which would be a shame because this cursor is really nice.

@Paxxi
Copy link
Contributor Author

Paxxi commented Jun 8, 2016

I see the issue, will investigate and see how we can solve it

@Paxxi
Copy link
Contributor Author

Paxxi commented Jun 8, 2016

Not sure if I will have time to investigate in the next few days so maybe revert this in case you want to do a release and we can give it another try once I figure it out

johnfn added a commit that referenced this pull request Jun 15, 2016
This effectively reverts #245.
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.

3 participants