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

Cannot go to caret mode from normal mode #3877

Merged
merged 7 commits into from
Oct 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content_scripts/mode_visual.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ VisualMode.prototype.movements = {
"Y"(count) { this.movement.selectLine(count); return this.yank(); },
"p"() { return chrome.runtime.sendMessage({handler: "openUrlInCurrentTab", url: this.yank()}); },
"P"() { return chrome.runtime.sendMessage({handler: "openUrlInNewTab", url: this.yank()}); },
"v"() { return new VisualMode; },
"V"() { return new VisualLineMode; },
"v"() { return new VisualMode().init(); },
"V"() { return new VisualLineMode().init(); },
"c"() {
// If we're already in caret mode, or if the selection looks the same as it would in caret mode, then
// callapse to anchor (so that the caret-mode selection will seem unchanged). Otherwise, we're in visual
Expand All @@ -396,7 +396,7 @@ VisualMode.prototype.movements = {
this.movement.collapseSelectionToAnchor();
else
this.movement.collapseSelectionToFocus();
return new CaretMode;
return new CaretMode().init();
},
"o"() { return this.movement.reverseSelection(); }
};
Expand Down